Changeset 2769
- Timestamp:
- 03/05/10 16:45:22 (2 years ago)
- Files:
-
- trunk/admin/Public/A2B_entity_callback.php (modified) (1 diff)
- trunk/admin/Public/A2B_mass_mail.php (modified) (5 diffs)
- trunk/admin/Public/form_data/FG_var_card.inc (modified) (3 diffs)
- trunk/common/lib/Form/Class.FormHandler.inc.php (modified) (8 diffs)
- trunk/common/lib/Form/Class.ViewHandler.inc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/admin/Public/A2B_entity_callback.php
r2421 r2769 40 40 41 41 42 if (! has_rights (ACX_CALLBACK)) {43 Header ("HTTP/1.0 401 Unauthorized");44 Header ("Location: PP_error.php?c=accessdenied"); 45 die(); 42 if (! has_rights (ACX_CALLBACK)) { 43 Header ("HTTP/1.0 401 Unauthorized"); 44 Header ("Location: PP_error.php?c=accessdenied"); 45 die(); 46 46 } 47 47 trunk/admin/Public/A2B_mass_mail.php
r2432 r2769 105 105 if(!empty($HD_Form -> FG_TABLE_CLAUSE)) { 106 106 $HD_Form -> FG_TABLE_CLAUSE .= " AND email <> ''"; 107 if($_REQUEST['id']!=null) 108 { 109 $HD_Form -> FG_TABLE_CLAUSE .= " AND id = '".$_REQUEST['id']."'"; 110 } 107 111 $list_customer = $instance_cus_table -> Get_list ($HD_Form -> DBHandle, $HD_Form -> FG_TABLE_CLAUSE, null, null, null, null, $limit_massmail, 0); 108 112 } else { 109 113 $sql_clause = "email <> ''"; 114 if($_REQUEST['id']!=null) 115 { 116 $sql_clause .= " AND id = '".$_REQUEST['id']."'"; 117 } 110 118 $list_customer = $instance_cus_table -> Get_list ($HD_Form -> DBHandle, $sql_clause, null, null, null, null, $limit_massmail, 0); 111 119 } … … 197 205 <script language="JavaScript" src="javascript/card.js"></script> 198 206 <div class="toggle_hide2show"> 207 <?php 208 if($_REQUEST['id']==null) 209 { 210 ?> 199 211 <center><a href="#" target="_self" class="toggle_menu"><img class="toggle_hide2show" src="<?php echo KICON_PATH; ?>/toggle_hide2show.png" onmouseover="this.style.cursor='hand';" HEIGHT="16"> <font class="fontstyle_002"><?php echo gettext("SEARCH CUSTOMERS");?> </font></a></center> 200 212 <div class="tohide" style="display:none;"> 201 202 <?php 203 // #### CREATE SEARCH FORM 213 <?php 214 } 215 ?> 216 <?php 217 if($_REQUEST['id']==null) 218 { 219 // #### CREATE SEARCH FORM 204 220 $HD_Form -> create_search_form(); 221 } 205 222 ?> 206 223 … … 237 254 } else { 238 255 if(is_array($list_customer) || $nb_customer > 1) { 256 257 if($_REQUEST['id']==null) 258 { 239 259 ?> 240 260 <tr> … … 242 262 <td align="center"> <span class="viewhandler_span1"><?php echo gettext("The mass mail tool is limited to 2000 mails. You can use the search module to send on different group of customer and overpass this limit.");?></span></td> 243 263 </tr> 264 <?php 265 } 266 ?> 244 267 <tr> 245 268 <td><span class="viewhandler_span1"> </span></td> … … 254 277 <?php 255 278 $link_to_customer = CUSTOMER_UI_URL; 256 279 if($nb_customer==1) 280 { 281 echo "<input type=\"hidden\" name=\"id\" value=".$_REQUEST['id'].">"; 282 } 257 283 if(is_array($list_customer)){ 258 284 for($key=0; $key < $nb_customer && $key <= 100; $key++){ 259 285 echo "<a href=A2B_entity_card.php?form_action=ask-edit&id=".$list_customer[$key]['id']." target=\"_blank\">".$list_customer[$key][1]."</a>"; 260 286 if ($key + 1 != $nb_customer) echo ", "; 261 echo "<input type=\"hidden\" name=\"hd_email[]\" value=".$list_customer[$key][ 0].">";287 echo "<input type=\"hidden\" name=\"hd_email[]\" value=".$list_customer[$key][1].">"; 262 288 if ($key == 100) { 263 289 echo "<br><a href=\"A2B_entity_card.php?atmenu=card&stitle=Customers_Card§ion=1\" target=\"_blank\">".gettext("Click on list customer to see them all")."</a>"; trunk/admin/Public/form_data/FG_var_card.inc
r2731 r2769 268 268 $HD_Form -> FG_OTHER_BUTTON3 = true; 269 269 $HD_Form -> FG_OTHER_BUTTON4 = true; 270 $HD_Form -> FG_OTHER_BUTTON5 = true; 270 271 $FN_COLUMN_ID="col".($FG_COL_QUERY_COUNT);//get numbers of rows for needed fields 271 272 $FN_COLUMN_USERNAME="col".($FG_COL_QUERY_COUNT+1); … … 275 276 $HD_Form -> FG_OTHER_BUTTON3_LINK="A2B_entity_payment.php?form_action=ask-add&card_id=|$FN_COLUMN_ID|"; 276 277 $HD_Form -> FG_OTHER_BUTTON4_LINK="A2B_entity_subscriber.php?form_action=ask-add&id=|$FN_COLUMN_ID|"; 278 $HD_Form -> FG_OTHER_BUTTON5_LINK="A2B_mass_mail.php?form_action=ask-add&id=|$FN_COLUMN_ID|"; 277 279 $HD_Form -> FG_INFO_LINK = "A2B_card_info.php?id="; 278 280 //FOR INFO , DEL, EDIT the image is already in Image_Path … … 281 283 $HD_Form -> FG_OTHER_BUTTON3_IMG = Images_Path . "/money.png"; 282 284 $HD_Form -> FG_OTHER_BUTTON4_IMG = Images_Path . "/book_add.png"; 285 $HD_Form -> FG_OTHER_BUTTON5_IMG = Images_Path . "/email.png"; 283 286 $HD_Form -> FG_OTHER_BUTTON1_ALT=gettext("Auto Create SIP Config"); 284 287 $HD_Form -> FG_OTHER_BUTTON2_ALT=gettext("Auto Create IAX Config"); 285 288 $HD_Form -> FG_OTHER_BUTTON3_ALT = gettext('Add Payment to this Card'); 286 289 $HD_Form -> FG_OTHER_BUTTON4_ALT = gettext('Add New Subscription to this Card'); 290 $HD_Form -> FG_OTHER_BUTTON5_ALT = gettext('Email to this Customer'); 287 291 } 288 292 trunk/common/lib/Form/Class.FormHandler.inc.php
r2673 r2769 134 134 var $FG_OTHER_BUTTON3=false; 135 135 var $FG_OTHER_BUTTON4=false; 136 var $FG_OTHER_BUTTON5=false; 136 137 137 138 … … 148 149 var $FG_OTHER_BUTTON3_LINK = ''; 149 150 var $FG_OTHER_BUTTON4_LINK = ''; 151 var $FG_OTHER_BUTTON5_LINK = ''; 150 152 151 153 var $FG_EDITION_IMG = 'edit.png'; … … 157 159 var $FG_OTHER_BUTTON3_IMG = ''; 158 160 var $FG_OTHER_BUTTON4_IMG = ''; 159 161 var $FG_OTHER_BUTTON5_IMG = ''; 162 160 163 var $FG_OTHER_BUTTON1_FORBIDDEN_KEY = array(); 161 164 var $FG_OTHER_BUTTON2_FORBIDDEN_KEY = array(); 162 165 var $FG_OTHER_BUTTON3_FORBIDDEN_KEY = array(); 163 166 var $FG_OTHER_BUTTON4_FORBIDDEN_KEY = array(); 164 167 var $FG_OTHER_BUTTON5_FORBIDDEN_KEY = array(); 168 165 169 var $FG_EDIT_PAGE_CONFIRM_BUTTON = ''; 166 170 var $FG_DELETE_PAGE_CONFIRM_BUTTON = ''; … … 281 285 var $FG_OTHER_BUTTON3_ALT = ''; 282 286 var $FG_OTHER_BUTTON4_ALT = ''; 287 var $FG_OTHER_BUTTON5_ALT = ''; 283 288 284 289 var $FG_OTHER_BUTTON1_HTML_CLASS = ''; … … 286 291 var $FG_OTHER_BUTTON3_HTML_CLASS = ''; 287 292 var $FG_OTHER_BUTTON4_HTML_CLASS = ''; 293 var $FG_OTHER_BUTTON5_HTML_CLASS = ''; 288 294 289 295 var $FG_OTHER_BUTTON1_HTML_ID = ''; … … 291 297 var $FG_OTHER_BUTTON3_HTML_ID = ''; 292 298 var $FG_OTHER_BUTTON4_HTML_ID = ''; 299 var $FG_OTHER_BUTTON5_HTML_ID = ''; 293 300 294 301 var $FG_OTHER_BUTTON1_CONDITION = ''; … … 296 303 var $FG_OTHER_BUTTON3_CONDITION = ''; 297 304 var $FG_OTHER_BUTTON4_CONDITION = ''; 305 var $FG_OTHER_BUTTON5_CONDITION = ''; 306 298 307 var $FG_EDITION_CONDITION = ''; 299 308 var $FG_DELETION_CONDITION = ''; … … 624 633 625 634 $this -> FG_TOTAL_TABLE_COL = $this -> FG_NB_TABLE_COL; 626 if ($this -> FG_DELETION || $this -> FG_INFO || $this -> FG_EDITION || $this -> FG_OTHER_BUTTON1 || $this -> FG_OTHER_BUTTON2 || $this -> FG_OTHER_BUTTON3 || $this -> FG_OTHER_BUTTON4 ) {635 if ($this -> FG_DELETION || $this -> FG_INFO || $this -> FG_EDITION || $this -> FG_OTHER_BUTTON1 || $this -> FG_OTHER_BUTTON2 || $this -> FG_OTHER_BUTTON3 || $this -> FG_OTHER_BUTTON4 || $this -> FG_OTHER_BUTTON5) { 627 636 $this -> FG_TOTAL_TABLE_COL++; 628 637 } trunk/common/lib/Form/Class.ViewHandler.inc.php
r2679 r2769 658 658 ?></a> 659 659 <?php } 660 } ?> 660 } 661 662 if($this->FG_OTHER_BUTTON5){ 663 $check = true; 664 $condition_eval=$this->FG_OTHER_BUTTON5_CONDITION; 665 $check_eval=false; 666 if (!empty($this->FG_OTHER_BUTTON5_CONDITION) && (eregi ('col[0-9]', $this->FG_OTHER_BUTTON5_CONDITION))) { 667 $check =false; 668 for ($h=count($list[$ligne_number]);$h>=0;$h--){ 669 $findme = "|col$h|"; 670 $pos = stripos($condition_eval, $findme); 671 if ($pos !== false) { 672 $condition_eval = str_replace($findme,$list[$ligne_number][$h],$condition_eval); 673 } 674 } 675 eval('$check_eval = '.$condition_eval.';'); 676 } 677 if($check || $check_eval){ 678 ?> 679 <a href="<?php 680 $new_FG_OTHER_BUTTON5_LINK = $this -> FG_OTHER_BUTTON5_LINK; 681 if (strpos($this -> FG_OTHER_BUTTON5_LINK,"|param|")){ 682 $new_FG_OTHER_BUTTON5_LINK = str_replace("|param|",$list[$ligne_number][$this->FG_NB_TABLE_COL],$this -> FG_OTHER_BUTTON5_LINK); 683 // SHOULD DO SMTH BETTER WITH paramx and get the x number to find the value to use 684 } 685 if (strpos($this -> FG_OTHER_BUTTON5_LINK,"|param1|")){ 686 $new_FG_OTHER_BUTTON5_LINK = str_replace("|param1|",$list[$ligne_number][$this->FG_NB_TABLE_COL-1],$this -> FG_OTHER_BUTTON5_LINK); 687 } 688 689 // REPLACE |colX| where is a numero of the column by the column value 690 if (eregi ('col[0-9]', $new_FG_OTHER_BUTTON5_LINK)) { 691 for ($h=0;$h<=$this->FG_NB_TABLE_COL;$h++){ 692 $findme = "|col$h|"; 693 $pos = stripos($new_FG_OTHER_BUTTON5_LINK, $findme); 694 if ($pos !== false) { 695 $new_FG_OTHER_BUTTON5_LINK = str_replace($findme,$list[$ligne_number][$h],$new_FG_OTHER_BUTTON5_LINK); 696 } 697 } 698 } 699 700 // REPLACE |col_origX| where is a numero of the column by the column value 701 if (eregi ('col_orig[0-9]', $new_FG_OTHER_BUTTON5_LINK)) { 702 for ($h=count($list[$ligne_number]);$h>=0;$h--){ 703 $findme = "|col_orig$h|"; 704 $pos = stripos($new_FG_OTHER_BUTTON5_LINK, $findme); 705 if ($pos !== false) { 706 $new_FG_OTHER_BUTTON5_LINK = str_replace($findme,$origlist[$ligne_number][$h],$new_FG_OTHER_BUTTON5_LINK); 707 } 708 } 709 } 710 echo $new_FG_OTHER_BUTTON5_LINK; 711 712 $extra_html=""; 713 714 if(!empty($this->FG_OTHER_BUTTON5_HTML_ID) && (eregi ('col[0-9]',$this->FG_OTHER_BUTTON5_HTML_ID))){ 715 $temp_id =$this->FG_OTHER_BUTTON5_HTML_ID; 716 for ($h=count($list[$ligne_number]);$h>=0;$h--){ 717 $findme = "|col$h|"; 718 $pos = stripos($temp_id, $findme); 719 if ($pos !== false) { 720 $temp_id = str_replace($findme,$origlist[$ligne_number][$h],$temp_id); 721 } 722 } 723 $extra_html.=' id="'.$temp_id.'"'; 724 725 } 726 727 if(!empty($this->FG_OTHER_BUTTON5_HTML_CLASS) ){ 728 $extra_html.= ' class="'.$this->FG_OTHER_BUTTON5_HTML_CLASS.'" '; 729 } 730 731 732 733 if (substr($new_FG_OTHER_BUTTON5_LINK,-1)=='=') echo $list[$ligne_number][$this->FG_NB_TABLE_COL]; 734 if (strlen($this -> FG_OTHER_BUTTON5_IMG)==0){ 735 echo '"'.$extra_html.'> '.'<span class="cssbutton">'.$this->FG_OTHER_BUTTON5_ALT.'</span>'; 736 }else{ 737 ?>" <?php echo $extra_html ?> ><img src="<?php echo $this -> FG_OTHER_BUTTON5_IMG?>" border="0" title="<?php echo $this->FG_OTHER_BUTTON5_ALT?>" alt="<?php echo $this->FG_OTHER_BUTTON5_ALT?>"><?php 738 739 } 740 ?></a> 741 <?php 742 } 743 } 744 ?> 661 745 662 746
