Exemplo n.º 1
0
 protected function getConstants()
 {
     $collect = [];
     $data = $this->reflection->getConstants();
     foreach ($data as $key => $value) {
         $collect[] = Constant::factory(compact('key', 'value'));
     }
     return $collect;
 }
Exemplo n.º 2
0
 /**
  * Constructor.
  */
 private function __construct()
 {
     try {
         try {
             $actual_link = "{$_SERVER['REQUEST_URI']}";
             $arr = explode('/', $actual_link);
             if ('business' == $arr[2]) {
                 require_once "Constant.php";
             } else {
                 require_once "Constant.php";
             }
         } catch (Exception $e) {
         }
         $this->connection = Constant::createConnectionForDB();
         $this->connection->exec("SET CHARACTER SET utf8");
     } catch (PDOException $e) {
         print "Error!: " . $e->getMessage() . "<br/>";
         die;
     }
 }
Exemplo n.º 3
0
                    <div class="row carousel-holder">

                        <div class="col-md-12">
                            <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                                <ol class="carousel-indicators">
                                    <?php 
foreach ($banner as $key => $value) {
    echo '<li data-target="#carousel-example-generic" data-slide-to="' . $key . '" class="' . ($key === 0 ? "active" : "") . '"></li>';
}
?>
                                </ol>
                                <div class="carousel-inner">
                                    <?php 
foreach ($banner as $key => $value) {
    echo '<div class="item ' . ($key === 0 ? "active" : "") . '">';
    echo '<img class="slide-image" src="' . base_url(Constant::getUploadBannerPath() . $value["link"]) . '">';
    echo '</div>';
}
?>
                                </div>
                                <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
                                    <span class="glyphicon glyphicon-chevron-left"></span>
                                </a>
                                <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
                                    <span class="glyphicon glyphicon-chevron-right"></span>
                                </a>
                            </div>
                        </div>

                    </div>
Exemplo n.º 4
0
 public static function findOverlappingOfTwoLines($line1, $line2, &$overlap1, &$overlap2)
 {
     $isLine1Reversed = FALSE;
     // Check same line or not
     if (!Lines::isTwoPiecesOnSameLine($line1, $line2)) {
         return FALSE;
     }
     // Check same directions or not
     if (!Lines::areTwoVectorHaveSameDirection($line1, $line2)) {
         $line1->reverse();
         $isLine1Reversed = TRUE;
     }
     // Points
     $point1 = $line1->point1;
     $point2 = $line1->point2;
     // Line 1
     $point3 = $line2->point1;
     $point4 = $line2->point2;
     // Line 2
     // Calculate line coordinates from point1
     $x1 = 0;
     $x2 = Points::twoPointsDistance($point1, $point2);
     $x3 = Points::twoPointsDistance($point1, $point3);
     $x4 = Points::twoPointsDistance($point1, $point4);
     // Set sign to coordinates
     if (!Lines::areTwoVectorHaveSameDirection($line1, new \Classes\Utils\AbstractInstance\Line($point1, $point3))) {
         $x3 *= -1;
     }
     // Set sign to coordinates
     if (!Lines::areTwoVectorHaveSameDirection($line1, new \Classes\Utils\AbstractInstance\Line($point1, $point4))) {
         $x4 *= -1;
     }
     // Overlapping length
     $length = min($x2, $x4) - max($x1, $x3);
     // Check if therу is overlapping
     if ($length <= 0) {
         return FALSE;
     }
     // Create coordinate array
     $arrayToSort = array(0 => array('point' => 1, 'value' => $x1), 1 => array('point' => 2, 'value' => $x2), 2 => array('point' => 3, 'value' => $x3), 3 => array('point' => 4, 'value' => $x4));
     $sortedArray = Constant::sortArrayByIndex($arrayToSort, 'value');
     // Check variant of overlapping
     // 1-3-2-4
     if ($sortedArray[0]['point'] == 1 && $sortedArray[1]['point'] == 3 && $sortedArray[2]['point'] == 2 && $sortedArray[3]['point'] == 4) {
         $overlap1 = array($x3, $x2);
         $overlap2 = array(0, $x2 - $x3);
     }
     // 3-1-4-2
     if ($sortedArray[0]['point'] == 3 && $sortedArray[1]['point'] == 1 && $sortedArray[2]['point'] == 4 && $sortedArray[3]['point'] == 2) {
         $overlap1 = array(0, $x4);
         $overlap2 = array($x1 - $x3, $x4 - $x3);
     }
     // 1-3-4-2
     if ($sortedArray[0]['point'] == 1 && $sortedArray[1]['point'] == 3 && $sortedArray[2]['point'] == 4 && $sortedArray[3]['point'] == 2) {
         $overlap1 = array($x3, $x4);
         $overlap2 = array(0, $x4 - $x3);
     }
     // 3-1-2-4
     if ($sortedArray[0]['point'] == 3 && $sortedArray[1]['point'] == 1 && $sortedArray[2]['point'] == 2 && $sortedArray[3]['point'] == 4) {
         $overlap1 = array(0, $x2);
         $overlap2 = array($x1 - $x3, $x2 - $x3);
     }
     // Reverse overlapping of line1
     if ($isLine1Reversed) {
         // $x2 = Length(line1)
         $begin = $x2 - $overlap1[1];
         $end = $x2 - $overlap1[0];
         $overlap1[0] = $begin;
         $overlap1[1] = $end;
     }
     return TRUE;
 }
Exemplo n.º 5
0

    <div class="well accordion">
        <h4>Tour Destinations</h4>
        <div id="accordion">
            <?php 
foreach ($group_category as $key => $value) {
    echo "<h3" . (isset($groupCategoryId) && $groupCategoryId == $key ? " class='expand' " : "") . ">";
    //                                echo "<h3>";
    if ($value->icon) {
        echo "<img src='" . base_url(Constant::getUploadIconPath() . $value->icon) . "' /> ";
    }
    echo $value->name . "</h3>";
    echo '<div class="list-group">';
    foreach ($value->arr as $arr) {
        echo '<a href="' . base_url($arr["link"]) . '" class="list-group-item">' . $arr["name"] . '</a>';
        //                            <span class="badge">12</span>
    }
    echo '</div>';
}
?>
        </div>
    </div>

     <?php 
foreach ($sidebarBoxs as $key => $value) {
    ?>
        <div class="well accordion">
            <h4><?php 
    echo $value["page_h_header"];
    ?>
Exemplo n.º 6
0
                                {product_itinerary}
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-12 col-md-12 col-sm-12 product-detail">
                                {product_details}
                            </div>
                        </div>


                        <div class="row">
                            <div class="col-lg-12 col-md-12 col-sm-12">
                                <p>
                                    <a href="<?php 
echo base_url(Constant::getUploadProductPdfPath("/{product_pdf_link}"));
?>
"  target="_blank">
                                        <img src="<?php 
echo base_url(Constant::getImagePath("download_btn.png"));
?>
" alt="download_pdf" border="0">
                                    </a>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
Exemplo n.º 7
0
    </div>
</div>

<div class="row" id="content">
    <?php 
foreach ($products as $key => $product) {
    ?>
        <div class="col-sm-6 col-lg-6 col-md-6">

            <a href="<?php 
    echo base_url("product/index/" . $product["category_id"] . "/" . $product["id"]);
    ?>
">
                <div class="thumbnail">
                    <img src="<?php 
    echo base_url(Constant::getUploadProductBannerPath() . $product["product_banner_link"]);
    ?>
" alt="">

                    <hr/>
                    <div class="caption">

                                                <!--<h4 class="pull-right"><?php 
    echo number_format($product["product_price"], 0, '.', ',');
    ?>
 บาท</h4>-->
                        <h5 class="header">
                            <?php 
    echo $product["product_header"];
    ?>
                        </h5>
Exemplo n.º 8
0
<?php

/**
 * This code is Jamhuri special and it enables you to access buygoods functionality
 * from any system build on top of php.
 * @author Derrick Rono <*****@*****.**>
 */
require_once 'config/Constant.php';
require_once 'lib/MpesaAPI.php';
$Password = Constant::generateHash();
$mpesaclient = new MpesaAPI();
$mpesaclient->processCheckOutRequest($Password, MERCHANT_ID, "1232434", "123454", "60", "254713038301", "http://google.com");
Exemplo n.º 9
0
			 <!-- Populating the List -->
				
			  <?php 
if (count($duty_places)) {
    ?>
				<?php 
    foreach ($duty_places as $j => $duty_place) {
        ?>
				
              <tr>
                <td align="left"><?php 
        echo $duty_place->getTitle();
        ?>
 </td>
				<td align="center"><?php 
        echo Constant::GetRecordStatusTitle($duty_place->getStatus());
        ?>
</td>
				<td align="center"><?php 
        echo $duty_place->getUpdatedAt('d-M-Y');
        ?>
				<td align="right">
				<?php 
        echo link_to('&nbsp;', 'DutyPlace/edit?id=' . Utility::EncryptQueryString($duty_place->getId()), array('title' => 'Edit', 'class' => 'edit'));
        ?>
				
				<?php 
        echo link_to('&nbsp;', 'DutyPlace/delete?id=' . Utility::EncryptQueryString($duty_place->getId()), array('confirm' => 'Are you sure you want to Delete this?', 'title' => 'Delete', 'class' => 'delete'));
        ?>
				</td>
              </tr>
Exemplo n.º 10
0
 /**
  * Visit a node with kind `\ast\AST_CLASS_CONST_DECL`
  *
  * @param Node $node
  * A node to parse
  *
  * @return Context
  * A new or an unchanged context resulting from
  * parsing the node
  */
 public function visitClassConstDecl(Node $node) : Context
 {
     $clazz = $this->getContextClass();
     foreach ($node->children ?? [] as $child_node) {
         $constant = new Constant($this->context->withLineNumberStart($child_node->lineno ?? 0)->withLineNumberEnd($child_node->endLineno ?? 0), $child_node->children['name'], new UnionType(), $child_node->flags ?? 0);
         $constant->setFutureUnionType(new FutureUnionType($this->code_base, $this->context, $child_node->children['value']));
         $clazz->addConstant($this->code_base, $constant);
     }
     return $this->context;
 }
Exemplo n.º 11
0
    ?>
		<?php 
    foreach ($designations as $j => $designation) {
        ?>
		
		<tr>
		<td align="left"><?php 
        echo $designation->getTitle();
        ?>
 </td>
		<td align="left">&nbsp;<?php 
        echo $designation->getDepartment();
        ?>
</td>
		<td align="center"><?php 
        echo Constant::GetRecordStatusTitle($designation->getStatus());
        ?>
</td>
		<td align="center"><?php 
        echo $designation->getUpdatedAt('d-M-Y');
        ?>
		<td align="right" class="edit">
		<?php 
        echo link_to('&nbsp;', 'Designation/edit?id=' . Utility::EncryptQueryString($designation->getId()), array('title' => 'Edit', 'class' => 'edit'));
        ?>
		<?php 
        echo link_to('&nbsp;', 'Designation/delete?id=' . Utility::EncryptQueryString($designation->getId()), array('confirm' => 'Are you sure you want to Delete this?', 'title' => 'Delete', 'class' => 'delete'));
        ?>
		</td>
	  </tr>
	  
Exemplo n.º 12
0
			 <!-- Populating the List -->
				
			  <?php 
if (count($wards)) {
    ?>
				<?php 
    foreach ($wards as $j => $ward) {
        ?>
				
              <tr>
                <td align="left"><?php 
        echo $ward->getTitle();
        ?>
 </td>
				<td align="center"><?php 
        echo Constant::GetRecordStatusTitle($ward->getStatus());
        ?>
</td>
				<td align="right">
				<?php 
        echo link_to('&nbsp;', 'Ward/edit?id=' . Utility::EncryptQueryString($ward->getId()), array('title' => 'Edit', 'class' => 'edit'));
        ?>
				
				<?php 
        echo link_to('&nbsp;', 'Ward/delete?id=' . Utility::EncryptQueryString($ward->getId()), array('confirm' => 'Are you sure you want to Delete this?', 'title' => 'Delete', 'class' => 'delete'));
        ?>
				</td>
              </tr>
			  
			  <?php 
    }
Exemplo n.º 13
0
	<td>Work Experience:(in Years)</td>
	<td>&nbsp;<?php 
//echo $employee->getExperienceYear();
?>
</td>
	<td>Employment Date:</td>
	<td>&nbsp;<?php 
echo $employee->getEmploymentDate('d-M-Y');
?>
 </td>
</tr>

<tr class="datagrid">
	<td>Local Resident:</td>
	<td>&nbsp;<?php 
echo Constant::GetBooleanWord($employee->getLocalResident());
?>
</td>
	<td colspan="2">&nbsp;</td>
	</tr>

<tr>
	<td colspan="4" height="40">&nbsp;</td>
</tr>


<tr class="datagrid">
	<th colspan="4">System Authentication Information</th>
</tr>

Exemplo n.º 14
0
			 <!-- Populating the List -->
				
			  <?php 
if (count($dosages)) {
    ?>
				<?php 
    foreach ($dosages as $j => $dosage) {
        ?>
				
              <tr>
                <td align="left"><?php 
        echo $dosage->getTitle();
        ?>
 </td>
				<td align="center"><?php 
        echo Constant::GetRecordStatusTitle($dosage->getStatus());
        ?>
</td>
			
				<td align="right">
				<?php 
        echo link_to('&nbsp;', 'Dosage/edit?id=' . Utility::EncryptQueryString($dosage->getId()), array('title' => 'Edit', 'class' => 'edit'));
        ?>
				
				<?php 
        echo link_to('&nbsp;', 'Dosage/delete?id=' . Utility::EncryptQueryString($dosage->getId()), array('confirm' => 'Are you sure you want to Delete this?', 'title' => 'Delete', 'class' => 'delete'));
        ?>
				</td>
              </tr>
			  
			  <?php 
Exemplo n.º 15
0
 /**
  * @covers Classes\Utils\Math\Lines::findOverlappingOfTwoLines
  */
 public function testFindOverlappingOfTwoLines_9()
 {
     $p1 = new \Classes\Utils\AbstractInstance\Point(3, 3, 3);
     $p2 = new \Classes\Utils\AbstractInstance\Point(5, 5, 5);
     $p3 = new \Classes\Utils\AbstractInstance\Point(10, 10, 10);
     $p4 = new \Classes\Utils\AbstractInstance\Point(0, 0, 0);
     $line1 = new \Classes\Utils\AbstractInstance\Line($p1, $p2);
     $line2 = new \Classes\Utils\AbstractInstance\Line($p3, $p4);
     $overlap1 = array();
     $overlap2 = array();
     $this->assertEquals(Lines::findOverlappingOfTwoLines($line1, $line2, $overlap1, $overlap2), TRUE);
     $this->assertEquals(Constant::isNumbersEqual($overlap1[0], 0), TRUE);
     $this->assertEquals(Constant::isNumbersEqual($overlap1[1], 2 * sqrt(3)), TRUE);
     $this->assertEquals(Constant::isNumbersEqual($overlap2[0], 5 * sqrt(3)), TRUE);
     $this->assertEquals(Constant::isNumbersEqual($overlap2[1], 7 * sqrt(3)), TRUE);
 }
Exemplo n.º 16
0
 /**
  * Returns the first ServerNode object matching the given TSDNS hostname. Like the
  * TeamSpeak 3 Client, this method will start looking for a TSDNS server on the second-level
  * domain including a fallback to the third-level domain of the specified $tsdns parameter.
  *
  * @param  string $tsdns
  *
  * @throws ServerQueryException
  * @return ServerNode
  */
 public function serverGetByTSDNS($tsdns)
 {
     $parts = Uri::getFQDNParts($tsdns);
     $query = String::factory(array_shift($parts));
     while ($part = array_shift($parts)) {
         $query->prepend($part);
         try {
             $port = Constant::factory("tsdns://" . $query . "/?timeout=3")->resolve($tsdns)->section(":", 1);
             return $this->serverGetByPort($port == "" ? 9987 : $port);
         } catch (TransportException $e) {
             /* skip "Connection timed out" and "Connection refused" */
             if ($e->getCode() != 10060 && $e->getCode() != 10061) {
                 throw $e;
             }
         }
     }
     throw new ServerQueryException("invalid serverID", 0x400);
 }
Exemplo n.º 17
0
                        <hr/>
                        <img class="img-responsive" src="<?php 
        echo base_url(Constant::getUploadGalleryPath("/" . $group_gallery["gallery_link"]));
        ?>
" alt="">
                    </a>
                </div>
                <?php 
    }
}
?>

        <?php 
if (isset($gallerys)) {
    foreach ($gallerys as $gallery) {
        $pathImg = base_url(Constant::getUploadGalleryPath("/" . $gallery["gallery_link"]));
        ?>

                <div class="col-lg-4 col-md-4 col-xs-6 disabled">
                    <!--                    <a class="thumbnail-group-gallery" href="#">
                                            <img class="img-responsive" src="<?php 
        echo $pathImg;
        ?>
" alt="">
                                        </a>-->

                    <a class="thumbnail-group-gallery group1" href="<?php 
        echo $pathImg;
        ?>
" >
                        <img class="img-responsive" src="<?php 
Exemplo n.º 18
0
 /**
  * @expectedException DomainException
  */
 public function testShrinkOnlyAcceptsElementsOfTheDomainAsParameters()
 {
     $generator = new Constant(5);
     $generator->shrink(10);
 }
Exemplo n.º 19
0
 function getProductByCategoryId($categoryId, $lang, $productId = null, $page = 0)
 {
     $limitValue = Constant::getLimitValue();
     return $this->dbProductByCategoryId($categoryId, $lang, $productId)->limit($limitValue, $limitValue * $page)->get()->result_array();
 }
Exemplo n.º 20
0
 /**
  * @dataProvider validationProvider
  */
 public function testValidation($value, $options, $result)
 {
     $validator = new Constant($options);
     $this->assertEquals($result, $validator->validate($value));
 }
Exemplo n.º 21
0
		<!--<td align="left"><?php 
        //echo $visit->getEmployeeRelatedByWardDocId();
        ?>
</td>-->
		<td align="left"><?php 
        echo Constant::GetVisitStatusTitle($visit->getStatus());
        ?>
</td>
		<td align="left"><?php 
        echo $visit->getFee();
        ?>
</td>
		<td align="right" class="edit">
		<?php 
        $visit_status = Constant::GetVisitStatusTitle($visit->getStatus());
        $fee_status = Constant::GetVisitStatusTitle($visit->getFeePaid());
        if ($visit_status == Constant::VISIT_DONE_TITLE && $fee_status == Constant::VISIT_FEE_NOT_PAID_TITLE) {
            echo link_to('Pay Fee', 'FrontDesk/payVisitFee?visit=' . Utility::EncryptQueryString($visit->getId()), array('confirm' => 'Confirm Fee Payment!'));
        } elseif ($visit_status == Constant::VISIT_DONE_TITLE && $fee_status == Constant::VISIT_FEE_PAID_TITLE) {
            echo 'Fee Paid';
        } else {
            echo '';
        }
        ?>
		<?php 
        echo link_to('&nbsp;', 'FrontDesk/visitEdit?visit=' . Utility::EncryptQueryString($visit->getId()), array('title' => 'Edit', 'class' => 'edit'));
        ?>
		<?php 
        //echo link_to('&nbsp;','FrontDesk/deletevisit?id='.Utility::EncryptQueryString($visit->getId()), array('confirm'=>'Are you sure you want to Delete this?', 'title'=>'Delete', 'class' => 'delete'));
        ?>
		</td>
Exemplo n.º 22
0
        ?>
		<tr>
		<td align="left"><?php 
        echo $bed->getBed();
        ?>
 </td>
		<td align="left">&nbsp;<?php 
        echo $bed->getWard();
        ?>
</td>
		<td align="left">&nbsp;<?php 
        echo $bed->getPrice();
        ?>
</td>
		<td align="center"><?php 
        echo Constant::GetWardBedStatusTitle($bed->getStatus());
        ?>
</td>
				<td align="right" class="edit">
		<?php 
        echo link_to('&nbsp;', 'WardBed/edit?id=' . Utility::EncryptQueryString($bed->getId()), array('title' => 'Edit', 'class' => 'edit'));
        ?>
		<?php 
        echo link_to('&nbsp;', 'WardBed/delete?id=' . Utility::EncryptQueryString($bed->getId()), array('confirm' => 'Are you sure you want to Delete this?', 'title' => 'Delete', 'class' => 'delete'));
        ?>
		</td>
	  </tr>
	  
	   <?php 
    }
    ?>
Exemplo n.º 23
0
 public function group()
 {
     try {
         $crud = $this->getCrud();
         $crud->set_table('group_category');
         $crud->set_subject('Group');
         $crud->columns('icon', 'name', 'name_eng', 'show');
         $crud->field_type('show', 'true_false');
         $crud->set_field_upload('icon', Constant::getUploadIconPath());
         $crud->callback_after_upload(array($this, 'callback_after_upload'));
         $output = $crud->render();
         $this->output($output);
     } catch (Exception $e) {
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
Exemplo n.º 24
0
 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionMessage Constant name is expected.
  * @dataProvider evaluateBadValueDataProvider
  */
 public function testEvaluateBadValue($value)
 {
     $this->object->evaluate($value);
 }
Exemplo n.º 25
0
Arquivo: onp.php Projeto: rn0/php-calc
 public function __construct($value)
 {
     parent::__construct(M_E);
 }
Exemplo n.º 26
0
 public function ajaxError($status, $message = null)
 {
     if ($message === null) {
         $message = Constant::getAjaxMessage($status);
     }
     $this->ajaxReturn($status, array(), $message);
 }
Exemplo n.º 27
0
			 <!-- Populating the List -->
				
			  <?php 
if (count($departments)) {
    ?>
				<?php 
    foreach ($departments as $j => $department) {
        ?>
				
              <tr>
                <td align="left"><?php 
        echo $department->getTitle();
        ?>
 </td>
				<td align="center"><?php 
        echo Constant::GetRecordStatusTitle($department->getStatus());
        ?>
</td>
				<td align="center"><?php 
        echo $department->getUpdatedAt('d-M-Y');
        ?>
				<td align="right">
				<?php 
        echo link_to('&nbsp;', 'Department/edit?id=' . Utility::EncryptQueryString($department->getId()), array('title' => 'Edit', 'class' => 'edit'));
        ?>
				
				<?php 
        echo link_to('&nbsp;', 'Department/delete?id=' . Utility::EncryptQueryString($department->getId()), array('confirm' => 'Are you sure you want to Delete this?', 'title' => 'Delete', 'class' => 'delete'));
        ?>
				</td>
              </tr>
Exemplo n.º 28
0
 public static function isPointOnLine($point, $line)
 {
     $dx = $line->point1->x - $line->point2->x;
     $dy = $line->point1->y - $line->point2->y;
     $dz = $line->point1->z - $line->point2->z;
     // Create array of p
     $p = array();
     if (!Constant::isNumbersEqual($dx, 0)) {
         $p[] = ($point->x - $line->point2->x) / $dx;
     } else {
         // X coordinate of all point must be same
         if (!Constant::isNumbersEqual($point->x, $line->point1->x)) {
             return 0;
         }
     }
     if (!Constant::isNumbersEqual($dy, 0)) {
         $p[] = ($point->y - $line->point2->y) / $dy;
     } else {
         // Y coordinate of all point must be same
         if (!Constant::isNumbersEqual($point->y, $line->point1->y)) {
             return 0;
         }
     }
     if (!Constant::isNumbersEqual($dz, 0)) {
         $p[] = ($point->z - $line->point2->z) / $dz;
     } else {
         // Z coordinate of all point must be same
         if (!Constant::isNumbersEqual($point->z, $line->point1->z)) {
             return 0;
         }
     }
     // CASE 4
     if (count($p) == 0) {
         return 4;
     }
     // All members in p array must be same
     $isEqual = TRUE;
     if (count($p) > 1) {
         for ($i = 1; $i < count($p); $i++) {
             if (!Constant::isNumbersEqual($p[$i], $p[0])) {
                 $isEqual = FALSE;
             }
         }
     }
     // CASE 0
     if (!$isEqual) {
         return 0;
     }
     // CASE 2
     if (Constant::isNumbersEqual($p[0], 0) || Constant::isNumbersEqual($p[0], 1)) {
         return 2;
     }
     // CASE 3
     if ($p[0] > 0 && $p[0] < 1) {
         return 3;
     }
     // CASE 1
     return 1;
 }
Exemplo n.º 29
0
 public function jsonReturn($code, $msg = '', $data = null)
 {
     if ($msg === '') {
         $msg = Constant::getMessage($code);
     }
     Yii::app()->request->setIsAjaxRequest(true);
     header('Content-Type: application/json');
     echo json_encode(array('code' => $code, 'msg' => $msg, 'data' => $data));
     Yii::app()->end();
 }
Exemplo n.º 30
0
    ?>
				<?php 
    foreach ($lab_tests as $j => $lab_test) {
        ?>
				
              <tr>
                <td align="left"><?php 
        echo $lab_test->getTitle();
        ?>
 </td>
				<td align="left"><?php 
        echo $lab_test->getPrice();
        ?>
</td>
				<td align="center"><?php 
        echo Constant::GetRecordStatusTitle($lab_test->getStatus());
        ?>
</td>
				<td align="center"><?php 
        echo $lab_test->getUpdatedAt('d-M-Y');
        ?>
				<td align="right">
				<?php 
        echo link_to('&nbsp;', 'LabTest/edit?id=' . Utility::EncryptQueryString($lab_test->getId()), array('title' => 'Edit', 'class' => 'edit'));
        ?>
				
				<?php 
        echo link_to('&nbsp;', 'LabTest/delete?id=' . Utility::EncryptQueryString($lab_test->getId()), array('confirm' => 'Are you sure you want to Delete this?', 'title' => 'Delete', 'class' => 'delete'));
        ?>
				</td>
              </tr>