Renamed the password fields in the modify phone page for the admin interface

Added SCRIPT field type to custom fields

git-svn-id: svn://192.168.202.10@1461 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-06-29 06:47:02 +00:00
parent b0429123c3
commit 4b3a3f6474
5 changed files with 68 additions and 35 deletions
+2 -2
View File
@@ -2116,7 +2116,7 @@ field_name VARCHAR(1000),
field_description VARCHAR(100),
field_rank SMALLINT(5),
field_help VARCHAR(1000),
field_type ENUM('TEXT','AREA','SELECT','MULTI','RADIO','CHECKBOX','DATE','TIME','DISPLAY') default 'TEXT',
field_type ENUM('TEXT','AREA','SELECT','MULTI','RADIO','CHECKBOX','DATE','TIME','DISPLAY','SCRIPT') default 'TEXT',
field_options VARCHAR(5000),
field_size SMALLINT(5),
field_max SMALLINT(5),
@@ -2269,7 +2269,7 @@ ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT N
CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log;
UPDATE system_settings SET db_schema_version='1229',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1230',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+4
View File
@@ -389,3 +389,7 @@ ALTER TABLE system_settings ADD label_email VARCHAR(40) default '';
ALTER TABLE system_settings ADD label_comments VARCHAR(40) default '';
UPDATE system_settings SET db_schema_version='1229',db_schema_update_date=NOW();
ALTER TABLE vicidial_lists_fields MODIFY field_type ENUM('TEXT','AREA','SELECT','MULTI','RADIO','CHECKBOX','DATE','TIME','DISPLAY','SCRIPT') default 'TEXT';
UPDATE system_settings SET db_schema_version='1230',db_schema_update_date=NOW();
@@ -237,6 +237,11 @@ Label Security Phrase||
Label Email||
Label Comments||
We do not recommend setting inbound calls to a higher priority than the outbound campaign calls because people calling in expect to wait and people being called expect for someone to be there on the phone||
Formerly called Conf File Secret||
Registration Password||
Login Password||
The password used for the phone user to login to the web-based client applications. IMPORTANT, this is the password only for the agent web interface phone login, to change the sip.conf or iax.conf password, or secret, for this phone device you need to modify the Registration Password in the next field||
SCRIPT will also display only, but you are able to use script variables just like in the Scripts feature. SCRIPT fields will also only display the content in the Options, and not the field name like the DISPLAY type does||
AST_VICIDIAL_ingrouplist.php
+8 -8
View File
@@ -5584,7 +5584,12 @@ if ($ADD==99999)
<BR>
<A NAME="phones-pass">
<BR>
<B>Password -</B> The password used for the phone user to login to the client applications. IMPORTANT, this is the password only for the agent web interface phone login, to change the sip.conf or iax.conf password, or secret, for this phone device you need to modify the Conf File Secret field further down on this page.
<B>Login Password -</B> The password used for the phone user to login to the web-based client applications. IMPORTANT, this is the password only for the agent web interface phone login, to change the sip.conf or iax.conf password, or secret, for this phone device you need to modify the Registration Password in the next field.
<BR>
<A NAME="phones-conf_secret">
<BR>
<B>Registration Password -</B> This is the secret, or password, for the phone in the iax or sip auto-generated conf file for this phone. Limit is 20 characters alphanumeric dash and underscore accepted. Default is test. Formerly called Conf File Secret.
<BR>
<A NAME="phones-is_webphone">
@@ -5735,11 +5740,6 @@ if ($ADD==99999)
<BR>
<B>Phone Context -</B> This is the dial plan context that this phone will use to dial out. If you are running a call center and you do not want your agents to be able to dial out outside of the ViciDial applicaiton for example, then you would set this field to a dialplan context that does not exist, something like agent-nodial. default is default.
<BR>
<A NAME="phones-conf_secret">
<BR>
<B>Conf File Secret -</B> This is the secret, or password, for the phone in the iax or sip auto-generated conf file for this phone. Limit is 20 characters alphanumeric dash and underscore accepted. Default is test.
<BR>
<A NAME="phones-codecs_list">
<BR>
@@ -22426,7 +22426,8 @@ if ($ADD==31111111111)
echo "<option SELECTED>$row[5]</option>\n";
echo "</select>$NWB#phones-server_ip$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Login: </td><td align=left><input type=text name=login size=10 maxlength=10 value=\"$row[6]\">$NWB#phones-login$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Password: </td><td align=left><input type=text name=pass size=10 maxlength=10 value=\"$row[7]\">$NWB#phones-pass$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Login Password: </td><td align=left><input type=text name=pass size=10 maxlength=10 value=\"$row[7]\">$NWB#phones-pass$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Registration Password: </td><td align=left><input type=text name=conf_secret size=20 maxlength=20 value=\"$row[72]\">$NWB#phones-conf_secret$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Set As Webphone: </td><td align=left><select size=1 name=is_webphone><option>Y</option><option>N</option><option selected>$row[74]</option></select>$NWB#phones-is_webphone$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Use External Server IP: </td><td align=left><select size=1 name=use_external_server_ip><option>Y</option><option>N</option><option selected>$row[75]</option></select>$NWB#phones-use_external_server_ip$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Status: </td><td align=left><select size=1 name=status><option>ACTIVE</option><option>SUSPENDED</option><option>CLOSED</option><option>PENDING</option><option>ADMIN</option><option selected>$row[8]</option></select>$NWB#phones-status$NWE</td></tr>\n";
@@ -22458,7 +22459,6 @@ if ($ADD==31111111111)
echo "<tr bgcolor=#B6D3FC><td align=right>Exten Context: </td><td align=left><input type=text name=ext_context size=20 maxlength=20 value=\"$row[31]\">$NWB#phones-ext_context$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Phone Context: </td><td align=left><input type=text name=phone_context size=20 maxlength=20 value=\"$row[70]\">$NWB#phones-phone_context$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Conf File Secret: </td><td align=left><input type=text name=conf_secret size=20 maxlength=20 value=\"$row[72]\">$NWB#phones-conf_secret$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Allowed Codecs: </td><td align=left><input type=text name=codecs_list size=40 maxlength=100 value=\"$row[76]\">$NWB#phones-codecs_list$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Allowed Codecs With Template: </td><td align=left><select size=1 name=codecs_with_template><option>1</option><option>0</option><option selected>$row[77]</option></select>$NWB#phones-codecs_with_template$NWE</td></tr>\n";
+49 -25
View File
@@ -11,10 +11,11 @@
# 100508-1855 - Added field_order to allow for multiple fields on the same line
# 100509-0922 - Added copy fields options
# 100510-1130 - Added DISPLAY field type option
# 100629-0200 - Added SCRIPT field type option
#
$admin_version = '2.4-5';
$build = '100510-1130';
$admin_version = '2.4-6';
$build = '100629-0200';
require("dbconnect.php");
@@ -254,7 +255,7 @@ if ($action == "HELP")
<A NAME="vicidial_lists_fields-field_type">
<BR>
<B>Field Type -</B> This option defines the type of field that will be displayed. TEXT is a standard single-line entry form, AREA is a multi-line text box, SELECT is a single-selection pull-down menu, MULTI is a multiple-select box, RADIO is a list of radio buttons where only one option can be selected, CHECKBOX is a list of checkboxes where multiple options can be selected, DATE is a year month day calendar popup where the agent can select the date and TIME is a time selection box. The default is TEXT. For the SELECT, MULTI, RADIO and CHECKBOX options you must define the option values below in the Field Options box. DISPLAY will display only and not allow for modification by the agent.
<B>Field Type -</B> This option defines the type of field that will be displayed. TEXT is a standard single-line entry form, AREA is a multi-line text box, SELECT is a single-selection pull-down menu, MULTI is a multiple-select box, RADIO is a list of radio buttons where only one option can be selected, CHECKBOX is a list of checkboxes where multiple options can be selected, DATE is a year month day calendar popup where the agent can select the date and TIME is a time selection box. The default is TEXT. For the SELECT, MULTI, RADIO and CHECKBOX options you must define the option values below in the Field Options box. DISPLAY will display only and not allow for modification by the agent. SCRIPT will also display only, but you are able to use script variables just like in the Scripts feature. SCRIPT fields will also only display the content in the Options, and not the field name like the DISPLAY type does.
<BR><BR>
<A NAME="vicidial_lists_fields-field_options">
@@ -976,11 +977,16 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
{
$field_HTML .= "<textarea name=$A_field_label[$o] id=$A_field_label[$o] ROWS=$A_field_max[$o] COLS=$A_field_size[$o]></textarea>";
}
if ($A_field_type[$o]=='DISPLAY')
if ($A_field_type[$o]=='DISPLAY')
{
if ($A_field_default[$o]=='NULL') {$A_field_default[$o]='';}
$field_HTML .= "$A_field_default[$o]\n";
}
if ($A_field_type[$o]=='SCRIPT')
{
if ($A_field_default[$o]=='NULL') {$A_field_default[$o]='';}
$field_HTML .= "$A_field_options[$o]\n";
}
if ($A_field_type[$o]=='DATE')
{
if ( (strlen($A_field_default[$o])<1) or ($A_field_default[$o]=='NULL') ) {$A_field_default[$o]=0;}
@@ -1109,6 +1115,7 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
echo "<option>DATE</option>\n";
echo "<option>TIME</option>\n";
echo "<option>DISPLAY</option>\n";
echo "<option>SCRIPT</option>\n";
echo "<option selected>$A_field_type[$o]</option>\n";
echo "</select> $NWB#vicidial_lists_fields-field_type$NWE </td></tr>\n";
echo "<tr $bgcolor><td align=right>Field Options $A_field_rank[$o]: </td><td align=left><textarea name=field_options ROWS=5 COLS=60>$A_field_options[$o]</textarea> $NWB#vicidial_lists_fields-field_options$NWE </td></tr>\n";
@@ -1171,6 +1178,7 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
echo "<option>DATE</option>\n";
echo "<option>TIME</option>\n";
echo "<option>DISPLAY</option>\n";
echo "<option>SCRIPT</option>\n";
echo "<option selected>TEXT</option>\n";
echo "</select> $NWB#vicidial_lists_fields-field_type$NWE </td></tr>\n";
echo "<tr $bgcolor><td align=right>Field Options: </td><td align=left><textarea name=field_options ROWS=5 COLS=60></textarea> $NWB#vicidial_lists_fields-field_options$NWE </td></tr>\n";
@@ -1417,11 +1425,6 @@ function add_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field
$field_sql .= "VARCHAR($field_max) ";
$field_cost = ($field_max + $field_cost);
}
if ($field_type=='DISPLAY')
{
$field_sql .= "VARCHAR($field_max) ";
$field_cost = ($field_max + $field_cost);
}
if ($field_type=='AREA')
{
$field_sql .= "TEXT ";
@@ -1447,11 +1450,18 @@ function add_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field
else
{$field_sql .= ";";}
$stmtCUSTOM="$field_sql";
$rsltCUSTOM=mysql_query($stmtCUSTOM, $linkCUSTOM);
$table_update = mysql_affected_rows($linkCUSTOM);
if ($DB) {echo "$table_update|$stmtCUSTOM\n";}
if (!$rsltCUSTOM) {die('Could not execute: ' . mysql_error());}
if ( ($field_type=='DISPLAY') or ($field_type=='SCRIPT') )
{
if ($DB) {echo "Non-DB $field_type field type\n";}
}
else
{
$stmtCUSTOM="$field_sql";
$rsltCUSTOM=mysql_query($stmtCUSTOM, $linkCUSTOM);
$table_update = mysql_affected_rows($linkCUSTOM);
if ($DB) {echo "$table_update|$stmtCUSTOM\n";}
if (!$rsltCUSTOM) {die('Could not execute: ' . mysql_error());}
}
$stmt="INSERT INTO vicidial_lists_fields set field_label='$field_label',field_name='$field_name',field_description='$field_description',field_rank='$field_rank',field_help='$field_help',field_type='$field_type',field_options='$field_options',field_size='$field_size',field_max='$field_max',field_default='$field_default',field_required='$field_required',field_cost='$field_cost',list_id='$list_id',multi_position='$multi_position',name_position='$name_position',field_order='$field_order';";
$rslt=mysql_query($stmt, $link);
@@ -1543,11 +1553,18 @@ function modify_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$fi
else
{$field_sql .= "default '$field_default';";}
$stmtCUSTOM="$field_sql";
$rsltCUSTOM=mysql_query($stmtCUSTOM, $linkCUSTOM);
$field_update = mysql_affected_rows($linkCUSTOM);
if ($DB) {echo "$field_update|$stmtCUSTOM\n";}
if (!$rsltCUSTOM) {die('Could not execute: ' . mysql_error());}
if ( ($field_type=='DISPLAY') or ($field_type=='SCRIPT') )
{
if ($DB) {echo "Non-DB $field_type field type\n";}
}
else
{
$stmtCUSTOM="$field_sql";
$rsltCUSTOM=mysql_query($stmtCUSTOM, $linkCUSTOM);
$field_update = mysql_affected_rows($linkCUSTOM);
if ($DB) {echo "$field_update|$stmtCUSTOM\n";}
if (!$rsltCUSTOM) {die('Could not execute: ' . mysql_error());}
}
$stmt="UPDATE vicidial_lists_fields set field_label='$field_label',field_name='$field_name',field_description='$field_description',field_rank='$field_rank',field_help='$field_help',field_type='$field_type',field_options='$field_options',field_size='$field_size',field_max='$field_max',field_default='$field_default',field_required='$field_required',field_cost='$field_cost',multi_position='$multi_position',name_position='$name_position',field_order='$field_order' where list_id='$list_id' and field_id='$field_id';";
$rslt=mysql_query($stmt, $link);
@@ -1572,12 +1589,19 @@ function modify_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$fi
################################################################################
##### BEGIN delete field function
function delete_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field_id,$list_id,$field_label,$field_name,$field_description,$field_rank,$field_help,$field_type,$field_options,$field_size,$field_max,$field_default,$field_required,$field_cost,$multi_position,$name_position,$field_order)
{
$stmtCUSTOM="ALTER TABLE custom_$list_id DROP $field_label;";
$rsltCUSTOM=mysql_query($stmtCUSTOM, $linkCUSTOM);
$table_update = mysql_affected_rows($linkCUSTOM);
if ($DB) {echo "$table_update|$stmtCUSTOM\n";}
if (!$rsltCUSTOM) {die('Could not execute: ' . mysql_error());}
{
if ( ($field_type=='DISPLAY') or ($field_type=='SCRIPT') )
{
if ($DB) {echo "Non-DB $field_type field type\n";}
}
else
{
$stmtCUSTOM="ALTER TABLE custom_$list_id DROP $field_label;";
$rsltCUSTOM=mysql_query($stmtCUSTOM, $linkCUSTOM);
$table_update = mysql_affected_rows($linkCUSTOM);
if ($DB) {echo "$table_update|$stmtCUSTOM\n";}
if (!$rsltCUSTOM) {die('Could not execute: ' . mysql_error());}
}
$stmt="DELETE FROM vicidial_lists_fields WHERE field_label='$field_label' and field_id='$field_id' and list_id='$list_id' LIMIT 1;";
$rslt=mysql_query($stmt, $link);