Exemple #1
0
 $template->assign_vars(array('HIDDEN' => $data));
 $row = explode("|", $data);
 if (sizeof($row) > 1) {
     include "classes/deposit.php";
     $test = new deposit();
     for ($j = 0; $j < sizeof($row) - 1; $j++) {
         $field = explode(".", $row[$j]);
         //==Pulls an entry and verifies that the customer is a customer in the zone
         $field[2] = $test->is_cust($field[0]);
         if (!$field[2]) {
             $template->assign_block_vars('error', array('CLIENT_ID' => $field[0], 'GOAL' => $field[1], 'POSITION' => $j));
             $template->assign_block_vars('error.switch_who_the_hell', array());
             continue;
         }
         //==Pulls an entries goal out of the db and tests to see if the deposit is round
         $field[3] = $test->is_goal_round($field[2], $field[1]);
         //==Compares each entry to look for double customers
         $field[4] = $test->is_double($field[0], $row);
         if (!$field[2] || !$field[3] || !$field[4]) {
             $template->assign_block_vars('error', array('CLIENT_ID' => $field[0], 'GOAL' => $field[1], 'POSITION' => $j));
         }
         /*if($field[2]!=1){
         			$template->assign_block_vars('error.switch_not_cust', array());
         		}*/
         if ($field[3] != 1) {
             $template->assign_block_vars('error.switch_not_round_goal', array());
         }
         if ($field[4] != 1) {
             $template->assign_block_vars('error.switch_is_double', array());
         }
         if ($field[3] + $field[4] == 2) {