Changeset 8787
- Timestamp:
- 02/07/10 18:01:17 (7 months ago)
- Files:
-
- modules/branches/2.7/queues/functions.inc.php (modified) (3 diffs)
- modules/branches/2.7/queues/module.xml (modified) (1 diff)
- modules/branches/2.7/queues/page.queues.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.7/queues/functions.inc.php
r8785 r8787 561 561 } 562 562 563 function queues_add($account,$name,$password,$prefix,$goto,$agentannounce_id,$members,$joinannounce_id,$maxwait,$alertinfo='',$cwignore='0',$qregex='',$queuewait='0', $use_queue_context='0', $dynmembers = '', $dynmemberonly = ' ') {563 function queues_add($account,$name,$password,$prefix,$goto,$agentannounce_id,$members,$joinannounce_id,$maxwait,$alertinfo='',$cwignore='0',$qregex='',$queuewait='0', $use_queue_context='0', $dynmembers = '', $dynmemberonly = 'no') { 564 564 global $db,$astman,$amp_conf; 565 565 … … 643 643 // store dynamic member data in astDB 644 644 if ($astman) { 645 $dynmembers = array_unique($dynmembers); 645 646 foreach($dynmembers as $member){ 646 647 $mem=explode(',',$member); 647 $astman->database_put('QPENALTY/'.$account.'/agents',$mem[0],$mem[1]); 648 if (isset($mem[0]) && trim($mem[0]) != '') { 649 $penalty = isset($mem[1]) && ctype_digit(trim($mem[1])) ? $mem[1] : 0; 650 $astman->database_put('QPENALTY/'.$account.'/agents',trim($mem[0]),trim($penalty)); 651 } 648 652 } 649 653 $astman->database_put('QPENALTY/'.$account,'dynmemberonly',$dynmemberonly); … … 886 890 foreach($get as $key => $value){ 887 891 $key=explode('/',$key); 888 $mem[$key[ 3]]=$value;892 $mem[$key[4]]=$value; 889 893 } 890 894 foreach($mem as $mem => $pnlty){ 891 895 $dynmem[]=$mem.','.$pnlty; 892 896 } 893 } 894 $results['dynmembers']=implode("\n",$dynmem); 895 $results['dynmeberonly'] = $astman->database_get('QPENALTY/'.$account,'dynmemberonly'); 897 $results['dynmembers']=implode("\n",$dynmem); 898 } else { 899 $results['dynmembers']=''; 900 } 901 $results['dynmemberonly'] = $astman->database_get('QPENALTY/'.$account,'dynmemberonly'); 896 902 } else { 897 903 fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]); modules/branches/2.7/queues/module.xml
r8785 r8787 2 2 <rawname>queues</rawname> 3 3 <name>Queues</name> 4 <version>2.7.0beta1. 0</version>4 <version>2.7.0beta1.1</version> 5 5 <publisher>FreePBX</publisher> 6 6 <license>GPLv2+</license> modules/branches/2.7/queues/page.queues.php
r8786 r8787 256 256 </td> 257 257 <td> 258 <select onChange="insertExten( );" id="insexten" tabindex="<?php echo ++$tabindex;?>">258 <select onChange="insertExten('');" id="insexten" tabindex="<?php echo ++$tabindex;?>"> 259 259 <option value=""><?php echo _("(pick extension)")?></option> 260 260 <?php … … 269 269 270 270 <tr> 271 <td valign="top"><a href="#" class="info"><?php echo _('Dynamic Member Penalty') ?>:<span><br><?php echo _("Dynamic Members are extensions that can log in and out of the queue. When a member logges in to a queue, their penalty in the queue will be as specified here. Extensions included here will NOT be automaticlaylogged in to the queue.") ?><br><br></span></a></td>271 <td valign="top"><a href="#" class="info"><?php echo _('Dynamic Members') ?>:<span><br><?php echo _("Dynamic Members are extensions or callback numbers that can log in and out of the queue. When a member logs in to a queue, their penalty in the queue will be as specified here. Extensions included here will NOT automatically be logged in to the queue.") ?><br><br></span></a></td> 272 272 <td valign="top"> 273 273 <textarea id="dynmembers" cols="15" rows="<?php $rows = count($dynmembers)+1; echo (($rows < 5) ? 5 : (($rows > 20) ? 20 : $rows) ); ?>" name="dynmembers" tabindex="<?php echo ++$tabindex;?>"><?php echo $dynmembers; ?></textarea> … … 279 279 <a href=# class="info"><?php echo _("Extension Quick Pick")?> 280 280 <span> 281 <?php echo _("Choose an extension to append to the end of the dynamic memeber slist above.")?>281 <?php echo _("Choose an extension to append to the end of the dynamic memeber list above.")?> 282 282 </span> 283 283 </a> … … 297 297 298 298 <tr> 299 <td><a href="#" class="info"><?php echo _(" Allow only these?")?><span><?php echo _('Restrict dynamic queue memeber logins to only thoes listed in previous option. When set to yes, members not listed will be DENIED ACCESS to the queue.')?></span></a></td>300 <td><input type="radio" name="dynmemberonly" value="yes" <?php echo ($dynmemberonly=='yes'?'checked':'');?>><?php echo _('Yes')?><input type="radio" name="dynmemberonly" value=" yes" <?php echo ($dynmemberonly!='yes'?'checked':'');?> ><?php echo _('No')?>299 <td><a href="#" class="info"><?php echo _("Restrict Dynamic Agents")?><span><?php echo _('Restrict dynamic queue member logins to only thoes listed in the Dynamic Members list above. When set to Yes, members not listed will be DENIED ACCESS to the queue.')?></span></a></td> 300 <td><input type="radio" name="dynmemberonly" value="yes" <?php echo ($dynmemberonly=='yes'?'checked':'');?>><?php echo _('Yes')?><input type="radio" name="dynmemberonly" value="no" <?php echo ($dynmemberonly!='yes'?'checked':'');?> ><?php echo _('No')?> 301 301 </td> 302 302 </tr>
