Exemplo n.º 1
0
                            <table border="0" cellspacing="0">
                                <tr>
                                    <td style="width: 115px; font-size: 12px;">Company Name</td>
                                    <td style="width: 135px; font-size: 13px; color: #666; ">: <?php 
    echo $cusUser->company_name;
    ?>
</td>
                                </tr>
                                <tr>
                                    <td style="width: 115px; font-size: 12px;">&nbsp;</td>
                                    <td style="width: 135px; font-size: 13px; color: #666; ">&nbsp;</td>
                                </tr>
    <!--                                <tr>
                                    <td style="width: 115px; font-size: 12px;">Provisional Date</td>
                                    <td style="width: 135px; font-size: 13px; color: #666; ">: <?php 
    echo getFmtDate($cusUser->provisional_date, 'd-m-Y H:i:s');
    ?>
</td>
                                </tr>-->
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <table border="0" cellspacing="0">
                                <tr>
                                    <td style="width: 130px; font-size: 12px;">User Name</td>
                                    <td style="width: 430px; font-size: 13px; color: #666; ">: <?php 
    echo $cusUser->username;
    ?>
</td>
Exemplo n.º 2
0
                                    <td style="width: 135px; font-size: 13px; color: #666; ">: <?php 
    echo getFmtDate($cusUser->provisional_date, 'd-m-Y H:i:s');
    ?>
</td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <?php 
    if ($pdf_content) {
        $content = $pdf_content->content;
        $content = str_replace('__siteurl__', getSiteUrl(), $content);
        $content = str_replace('__name__', ucfirst($namee), $content);
        $content = str_replace('__call_date__', getFmtDate($cusUser->call_date, 'd-m-Y H:i:s'), $content);
        $content = str_replace('__namee1__', ucfirst($namee1), $content);
        //                                echo $content;
    }
    ?>
                        </td>
                    </tr>
                <?php 
}
?>
                <?php 
$ii = false;
$iiselect = false;
$pproduct = true;
?>
                <?php 
Exemplo n.º 3
0
 public function actionTest()
 {
     //        $franchises = DynamicCall::getBmsFranchise('http://orders.jaspersonline.co.uk/info/branchlist.php');
     //        $total = 0;
     //        $total_updates = 0;
     //        $total_not_updates = 0;
     //        $errors = array();
     //        $customers = array();
     //        foreach ($franchises as $franchise) {
     //            if (!$franchise instanceof Franchise)
     //                continue;
     //            foreach ($franchise->customers as $customer):
     ////                $result = DynamicCall::getBmsCustomer('chester', 90, 'http://dev.jaspersonline.co.uk/soap/jaspers.wsdl');
     //                $result = DynamicCall::getBmsCustomer(strtolower($franchise->name), $customer->id, 'http://dev.jaspersonline.co.uk/soap/jaspers.wsdl');
     //                if ($result) {
     //                    $date1 = getFmtDate($customer->update_time, 'Y-m-d H:i:s', 0, 20);
     //                    $date2 = getFmtDate($result['update_time'], 'Y-m-d H:i:s', 0, 20);
     //                    if (($date1 > $date2) || !($customer->update_time)) {
     //                        $errors[] = CActiveForm::validate($customer);
     ////                        $customer->attributes = $result;
     //                        $customers[] = $customer->attributes;
     //                        ++$total_updates;
     //                    } else {
     //                        ++$total_not_updates;
     //                    }
     //                    ++$total;
     //                }
     //            endforeach;
     //        }
     //        e($customers, 0);
     //        echo "total records Traversed = " . $total . "<br>";
     //        echo "total records Updated = " . $total_updates . "<br>";
     //        echo "total records Not Updated = " . $total_not_updates . "<br>";
     ////        echo print_r($errors);
     $franchises = DynamicCall::getBmsFranchise('http://orders.jaspersonline.co.uk/info/branchlist.php');
     $total = 0;
     $total_updates = 0;
     $total_not_updates = 0;
     $errors = array();
     foreach ($franchises as $franchise) {
         if (!$franchise instanceof Franchise) {
             continue;
         }
         foreach ($franchise->customers as $customer) {
             //                $result = DynamicCall::getBmsCustomer('chester', 90, 'http://dev.jaspersonline.co.uk/soap/jaspers.wsdl');
             //                $result = DynamicCall::getBmsCustomer(strtolower($franchise->name), $customer->id, 'http://dev.jaspersonline.co.uk/soap/jaspers.wsdl');
             $result = DynamicCall::getBmsCustomer('chester', $customer->id, 'http://dev.jaspersonline.co.uk/soap/jaspers.wsdl');
             if ($result) {
                 $date1 = getFmtDate($customer->update_time, 'Y-m-d H:i:s', 0, 20);
                 $date2 = getFmtDate($result['update_time'], 'Y-m-d H:i:s', 0, 20);
                 //                    if (($date1 > $date2) || !($customer->update_time)) {  // remove htis
                 echo "customer <br>";
                 e($customer->attributes, 0);
                 echo "geting data <br>";
                 e($result, 0);
                 echo "sync data <br>";
                 $customer->attributes = $result;
                 //                        e($result,0);
                 e($customer->attributes);
                 //                        $customer->save();
                 $errors[] = CActiveForm::validate($customer);
                 //                        e($errors);
                 ++$total_updates;
                 //                    } else {      // uncomment else part
                 //                        ++$total_not_updates;
                 //                    }
                 ++$total;
             }
         }
     }
     echo "total records Traversed = " . $total . "<br>";
     echo "total records Updated = " . $total_updates . "<br>";
     echo "total records Not Updated = " . $total_not_updates . "<br>";
     echo print_r($errors);
 }
Exemplo n.º 4
0
 public function adminOp($id)
 {
     $model = CustAppoint::model()->findByAttributes(array('app_id' => 2, 'cus_id' => $id));
     if ($model) {
         if ($model->status == 1) {
             echo "<a href=" . createUrl("site/getStarted2nd", array("id" => $id, 'tempAdmin' => 1)) . ">Admin</a>";
         } elseif ($model->status == 2) {
             echo "Completed " . getFmtDate($model->update_time, 'd-m-Y H:i:s');
         } else {
             echo "Not Started";
         }
     } else {
         echo "Not Started";
     }
 }