diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_jp/active_list_refresh.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_jp/active_list_refresh.php
new file mode 100644
index 00000000..0d28a1c3
--- /dev/null
+++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_jp/active_list_refresh.php
@@ -0,0 +1,483 @@
+ LICENSE: AGPLv2
+#
+# This script is designed purely to serve updates of the live data to the display scripts
+# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
+#
+# required variables:
+# - $server_ip
+# - $session_name
+# - $user
+# - $pass
+# optional variables:
+# - $ADD - ('1','2','3','4','5')
+# - $order - ('asc','desc')
+# - $format - ('text','table','menu','selectlist','textarea')
+# - $bgcolor - ('#123456','white','black','etc...')
+# - $txtcolor - ('#654321','black','white','etc...')
+# - $txtsize - ('1','2','3','etc...')
+# - $selectsize - ('2','3','4','etc...')
+# - $selectfontsize - ('8','10','12','etc...')
+# - $selectedext - ('cc100')
+# - $selectedtrunk - ('Zap/25-1')
+# - $selectedlocal - ('SIP/cc100')
+# - $textareaheight - ('8','10','12','etc...')
+# - $textareawidth - ('8','10','12','etc...')
+# - $field_name - ('extension','busyext','extension_xfer','etc...')
+#
+#
+# changes
+# 50323-1147 - First build of script
+# 50401-1132 - small formatting changes
+# 50502-1402 - added field_name as modifiable variable
+# 50503-1213 - added session_name checking for extra security
+# 50503-1311 - added conferences list
+# 50610-1155 - Added NULL check on MySQL results to reduced errors
+# 50711-1209 - removed HTTP authentication in favor of user/pass vars
+# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
+# 60619-1118 - Added variable filters to close security holes for login form
+# 90508-0727 - Changed to PHP long tags
+#
+
+require("dbconnect.php");
+
+### If you have globals turned off uncomment these lines
+if (isset($_GET["user"])) {$user=$_GET["user"];}
+ elseif (isset($_POST["user"])) {$user=$_POST["user"];}
+if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
+ elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
+if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
+ elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
+if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
+ elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
+if (isset($_GET["format"])) {$format=$_GET["format"];}
+ elseif (isset($_POST["format"])) {$format=$_POST["format"];}
+if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];}
+ elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];}
+if (isset($_GET["order"])) {$order=$_GET["order"];}
+ elseif (isset($_POST["order"])) {$order=$_POST["order"];}
+if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];}
+ elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];}
+if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];}
+ elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];}
+if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];}
+ elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];}
+if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];}
+ elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];}
+if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];}
+ elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];}
+if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];}
+ elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];}
+if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];}
+ elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];}
+if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];}
+ elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];}
+if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];}
+ elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];}
+if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];}
+ elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];}
+if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];}
+ elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];}
+
+### security strip all non-alphanumeric characters out of the variables ###
+ $user=ereg_replace("[^0-9a-zA-Z]","",$user);
+ $pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
+ $ADD=ereg_replace("[^0-9]","",$ADD);
+ $order=ereg_replace("[^0-9a-zA-Z]","",$order);
+ $format=ereg_replace("[^0-9a-zA-Z]","",$format);
+ $bgcolor=ereg_replace("[^\#0-9a-zA-Z]","",$bgcolor);
+ $txtcolor=ereg_replace("[^\#0-9a-zA-Z]","",$txtcolor);
+ $txtsize=ereg_replace("[^0-9a-zA-Z]","",$txtsize);
+ $selectsize=ereg_replace("[^0-9a-zA-Z]","",$selectsize);
+ $selectfontsize=ereg_replace("[^0-9a-zA-Z]","",$selectfontsize);
+ $selectedext=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedext);
+ $selectedtrunk=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedtrunk);
+ $selectedlocal=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedlocal);
+ $textareaheight=ereg_replace("[^0-9a-zA-Z]","",$textareaheight);
+ $textareawidth=ereg_replace("[^0-9a-zA-Z]","",$textareawidth);
+ $field_name=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$field_name);
+
+# default optional vars if not set
+if (!isset($ADD)) {$ADD="1";}
+if (!isset($order)) {$order='desc';}
+if (!isset($format)) {$format="text";}
+if (!isset($bgcolor)) {$bgcolor='white';}
+if (!isset($txtcolor)) {$txtcolor='black';}
+if (!isset($txtsize)) {$txtsize='2';}
+if (!isset($selectsize)) {$selectsize='4';}
+if (!isset($selectfontsize)) {$selectfontsize='10';}
+if (!isset($textareaheight)) {$textareaheight='10';}
+if (!isset($textareawidth)) {$textareawidth='20';}
+
+$version = '0.0.8';
+$build = '60619-1118';
+$StarTtime = date("U");
+$NOW_DATE = date("Y-m-d");
+$NOW_TIME = date("Y-m-d H:i:s");
+if (!isset($query_date)) {$query_date = $NOW_DATE;}
+
+ $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
+ if ($DB) {echo "|$stmt|\n";}
+ $rslt=mysql_query($stmt, $link);
+ $row=mysql_fetch_row($rslt);
+ $auth=$row[0];
+
+ if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
+ {
+ echo "無効 ユーザ名/パスワード: |$user|$pass|\n";
+ exit;
+ }
+ else
+ {
+
+ if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
+ {
+ echo "無効 server_ip: |$server_ip| or 無効 session_name: |$session_name|\n";
+ exit;
+ }
+ else
+ {
+ $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';";
+ if ($DB) {echo "|$stmt|\n";}
+ $rslt=mysql_query($stmt, $link);
+ $row=mysql_fetch_row($rslt);
+ $SNauth=$row[0];
+ if($SNauth==0)
+ {
+ echo "無効 session_name: |$session_name|$server_ip|\n";
+ exit;
+ }
+ else
+ {
+ # do nothing for now
+ }
+ }
+ }
+
+if ($format=='table')
+{
+echo "\n";
+echo "
\n";
+echo "\n";
+echo "リスト表示: ";
+if ($ADD==1) {echo "ライブ内線";}
+if ($ADD==2) {echo "話し中の内線";}
+if ($ADD==3) {echo "外線";}
+if ($ADD==4) {echo "ローカル内線";}
+if ($ADD==5) {echo "会議";}
+if ($ADD==99999) {echo "ヘルプ";}
+echo "\n";
+echo "\n";
+echo "\n";
+}
+
+
+
+
+
+######################
+# ADD=1 display all live extensions on a server
+######################
+if ($ADD==1)
+{
+ $pt='pt';
+ if (!$field_name) {$field_name = 'extension';}
+ if ($format=='table') {echo "
\n";}
+ if ($format=='menu') {echo "
\n";}
+ if ($format=='menu') {echo "\n";}
+ if ($format=='selectlist') {echo "\n";}
+ if ($format=='textarea') {echo "\n";}
+}
+
+
+
+
+
+
+
+######################
+# ADD=2 display all busy extensions on a server
+######################
+if ($ADD==2)
+{
+ if (!$field_name) {$field_name = 'busyext';}
+ if ($format=='table') {echo "
\n";}
+ if ($format=='menu') {echo "\n";}
+ if ($format=='selectlist')
+ {
+ echo "\n";
+ }
+ if ($format=='textarea')
+ {
+ echo "
\n";}
+ if ($format=='menu') {echo "\n";}
+ if ($format=='selectlist') {echo "\n";}
+ if ($format=='textarea') {echo "\n";}
+}
+
+
+
+
+
+
+######################
+# ADD=3 display all busy outside lines(trunks) on a server
+######################
+if ($ADD==3)
+{
+ if (!$field_name) {$field_name = 'trunk';}
+ if ($format=='table') {echo "
\n";}
+ if ($format=='menu') {echo "\n";}
+ if ($format=='selectlist')
+ {
+ echo "\n";
+ }
+ if ($format=='textarea')
+ {
+ echo "
\n";}
+ if ($format=='menu') {echo "\n";}
+ if ($format=='selectlist') {echo "\n";}
+ if ($format=='textarea') {echo "\n";}
+}
+
+
+
+
+
+
+######################
+# ADD=4 display all busy Local lines on a server
+######################
+if ($ADD==4)
+{
+ if (!$field_name) {$field_name = 'local';}
+ if ($format=='table') {echo "
\n";}
+ if ($format=='menu') {echo "\n";}
+ if ($format=='selectlist')
+ {
+ echo "\n";
+ }
+ if ($format=='textarea')
+ {
+ echo "
\n";}
+ if ($format=='menu') {echo "\n";}
+ if ($format=='selectlist') {echo "\n";}
+ if ($format=='textarea') {echo "\n";}
+}
+
+
+
+
+
+
+######################
+# ADD=5 display all agc-usable conferences on a server
+######################
+if ($ADD==5)
+{
+ $pt='pt';
+ if (!$field_name) {$field_name = 'conferences';}
+ if ($format=='table') {echo "
\n";}
+ if ($format=='menu') {echo "\n";}
+ if ($format=='selectlist')
+ {
+ echo "\n";
+ }
+ if ($format=='textarea')
+ {
+ echo "
\n";}
+ if ($format=='menu') {echo "\n";}
+ if ($format=='selectlist') {echo "\n";}
+ if ($format=='textarea') {echo "\n";}
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+$ENDtime = date("U");
+$RUNtime = ($ENDtime - $StarTtime);
+if ($format=='table') {echo "\n";}
+if ($format=='table') {echo "\n\n\n";}
+
+exit;
+
+?>
+
+
+
+
+
diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_jp/astguiclient.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_jp/astguiclient.php
new file mode 100644
index 00000000..652e6103
--- /dev/null
+++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_jp/astguiclient.php
@@ -0,0 +1,2908 @@
+ LICENSE: AGPLv2
+#
+# make sure you have added a user to the vicidial_users MySQL table with at least
+# user_level 1 or greater to access this page. Also you need to have the login
+# and pass of a phone listed in the asterisk.phones table. The page grabs the
+# server info and other details from this login and pass
+#
+# Other scripts that this application depends on:
+# - active_list_refresh.php: displays active/live channels and phones
+# - manager_send.php: sends Actions to be executed on Asterisk servers
+# - live_exten_check.php: checks to see if user's phone is on a live call
+# - call_log_display.php: retrieves log of inbound and outbound calls
+# - voicemail_check.php: retrieves counts of new and old messages
+# - inbound_popup.php: opens upon live_inbound call coming in
+# - conf_exten_check.php: checks to see if and calls are in a specific conf
+# - park_calls_display.php: retrieves list of parked calls
+# - vdc_db_query.php: Changes values in the DB for non-calling records
+#
+# CHANGES
+# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web
+# 50323-1411 - First build version display-only
+# 50331-1040 - Second-build, added phone login and hangup/hijack display
+# 50401-1006 - Trunk/Local Hangup functions enabled
+# 50404-1056 - Trunk/Local Hijack functions enabled
+# 50404-1459 - Simple live calls display and grabs updated time from server
+# 50405-1221 - Reorganized the display and layers, added some images
+# 50406-1005 - Added In/Out call log display to MAIN panel
+# 50407-1254 - Start/Stop Recording on live calls enabled
+# 50422-1101 - Activated Check Voicemail button and new/old messages count
+# 50428-1449 - Added dial from log and basic live_inbound call popup
+# 50429-1455 - Modified inbound popup code for IE and to add more functions
+# 50502-1442 - Added basic method to transfer live calls somewhere else
+# 50503-1205 - Added web_client_sessions entry for more security of subscripts
+# 50503-1537 - Added basic conferences display
+# 50509-1132 - Added conference connected list and hangup/xfer for them
+# 50511-1129 - Added registration of conference rooms and added manual dial
+# 50523-1342 - Added Conference recording and send DTMF
+# 50523-1622 - Added Local Dial window frame for calling local extensions
+# 50524-1456 - Added ability to park call and display number of parked calls
+# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls
+# 50525-1224 - Added ability to place outbound call from within conferene
+# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main
+# 50711-1229 - removed HTTP authentication in favor of user/pass vars
+# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens
+# 50804-1604 - Minor bug fix in inbound_popup functions
+# 50818-1715 - Added pretty login section
+# 50913-1137 - Added custom outbound_cid from phones table
+# 51110-1430 - Fixed non-standard http port issue
+# 60103-1421 - Added code for favorite extensions chooser
+# 60104-1347 - Added basic layout for favorites editing frame
+# 60105-1124 - Finished Favorites frame and added DB submission
+# 60112-1622 - Several formatting changes
+# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES
+# 60619-1103 - Added variable filters to close security holes for login form
+# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
+# 90508-0727 - Changed to PHP long tags
+# 91129-2211 - Replaced SELECT STAR in SQL query
+# 120223-2124 - Removed logging of good login passwords if webroot writable is enabled
+#
+
+require("dbconnect.php");
+
+### If you have globals turned off uncomment these lines
+if (isset($_GET["user"])) {$user=$_GET["user"];}
+ elseif (isset($_POST["user"])) {$user=$_POST["user"];}
+if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
+ elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
+if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
+ elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
+if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
+ elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
+if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];}
+ elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];}
+ if (!isset($phone_login))
+ {
+ if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];}
+ elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];}
+ }
+ if (!isset($phone_pass))
+ {
+ if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];}
+ elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];}
+ }
+
+$forever_stop=0;
+$user_abb = "$user$user$user$user";
+while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
+ {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
+
+$version = '2.2.4-1';
+$build = '120223-2124';
+
+### security strip all non-alphanumeric characters out of the variables ###
+ $DB=ereg_replace("[^0-9a-z]","",$DB);
+ $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login);
+ $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass);
+ $user=ereg_replace("[^0-9a-zA-Z]","",$user);
+ $pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
+
+
+if ($force_logout)
+ {
+ if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
+ {
+ Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
+ Header("HTTP/1.0 401 Unauthorized");
+ }
+ echo "今、ログアウトしています。ありがとうございました。\n";
+ exit;
+ }
+
+$StarTtime = date("U");
+$NOW_TIME = date("Y-m-d H:i:s");
+$FILE_TIME = date("Ymd-His");
+ $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y"));
+ $past_month_date = date("Y-m-d H:i:s",$month_old);
+
+ $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
+ if ($DB) {echo "|$stmt|\n";}
+ $rslt=mysql_query($stmt, $link);
+ $row=mysql_fetch_row($rslt);
+ $auth=$row[0];
+
+$US='_';
+$CL=':';
+if ($WeBRooTWritablE > 0)
+ {$fp = fopen ("./astguiclient_auth_entries.txt", "a");}
+$date = date("r");
+$ip = getenv("REMOTE_ADDR");
+$browser = getenv("HTTP_USER_AGENT");
+$script_name = getenv("SCRIPT_NAME");
+$server_name = getenv("SERVER_NAME");
+$server_port = getenv("SERVER_PORT");
+if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';}
+ else {$HTTPprotocol = 'http://';}
+if (($server_port == '80') or ($server_port == '443') ) {$server_port='';}
+else {$server_port = "$CL$server_port";}
+$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name";
+$agcDIR = $agcPAGE;
+$agcDIR = eregi_replace('astguiclient.php','',$agcDIR);
+
+if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
+ {
+ header ("Content-type: text/html; charset=utf-8");
+
+ echo "astGUIclient webクライアント: Login\n";
+ echo "\n";
+ echo "\n";
+ echo "