예제 #1
0
파일: index.php 프로젝트: arh922/ain
 $user_obj = new User();
 $user_details = $user_obj->user_load($uid);
 $cid = $user_details->cid;
 $phone_details = $db_fuctions_obj->get_phone_details($phone, $cid);
 //   pr($phone_details);
 $country_id = $ope_details[0]['country_id'];
 $end_date = $phone_details[0]['end_date'];
 //$uid = $phone_details[0]['uid'];
 $email = $phone_details[0]['email'];
 $now = time();
 //with period and he want to add new payment
 if ($now < $end_date) {
     $start_date = $phone_details[0]['date_added'];
     $end_date += $period;
     $db_fuctions_obj->update_payment($uid, $start_date, $end_date);
     $db_fuctions_obj->reset_payment_count($uid);
 } else {
     if ($now >= $end_date) {
         $end_date = $now + $period;
         $db_fuctions_obj->update_payment($uid, $now, $end_date);
         $db_fuctions_obj->reset_payment_count($uid);
     }
 }
 $db_fuctions_obj->activate_user($uid);
 $json = $callback . '({
     "proposals": 
     ';
 $json .= '{"success":"1","message":"success"}';
 $json .= '})';
 echo $json;
 //call bashar service