Ejemplo n.º 1
0
 /**
  * Returns a list of all classes inside a given package
  *
  * @param   lang.reflect.Package 
  * @param   bool recursive whether to include subpackages
  * @return  lang.XPClass[]
  */
 protected static function testClassesIn(Package $package, $recursive)
 {
     $r = array();
     foreach ($package->getClasses() as $class) {
         if (!$class->isSubclassOf('unittest.TestCase') || Modifiers::isAbstract($class->getModifiers())) {
             continue;
         }
         $r[] = $class;
     }
     if ($recursive) {
         foreach ($package->getPackages() as $package) {
             $r = array_merge($r, self::testClassesIn($package, $recursive));
         }
     }
     return $r;
 }
                <th>Package</th>
                <th>Date</th>
                <th>Time</th>
                <th>Venue</th>
                <th>Occasion</th>
                <th>Theme</th>
                <th>No. of Participants</th>
                <th>Status</th>
                
                
            </tr>
           
            <tr>
                <td>
                   <?php 
$selPackage = $package->getPackages(array("package_code" => "ASC"), array("package_code" => array($serviceRequestDetails->getPackage_code(), Equal)));
echo $selPackage[0]->getDesc();
?>
                </td>
                <td>
                     <?php 
echo $serviceRequestDetails->getDate();
?>
                </td>
                <td>
                     <?php 
echo $serviceRequestDetails->getTime();
?>
                </td>
                <td>
                     <?php 
 public function getPackageDetails()
 {
     $package = new Package();
     return $package->getPackages(array("package_code" => "ASC"), array("package_code" => array($this->package_code, Equal)));
 }
        if ($serviceRequest->save()) {
            $_SESSION["formInput"] = array();
            $_POST = array();
            $successMessage = "Service Request successfully filed.";
            // uncomment if you desire to redirect to same page
            //header('Location: '.$_SERVER['PHP_SELF'].'?message='.$successMessage);
            //this will redirect to service request list page
            header('Location:ServiceRequestList.php ');
            die;
        } else {
            $errorMessage = "Please check fields.";
        }
    }
}
$package = new Package();
$packages = $package->getPackages();
$packageOptions = "";
$servicePackageInput = isset($_SESSION["formInput"]["package_code"]) ? $_SESSION["formInput"]["package_code"] : "";
foreach ($packages as $package) {
    $selected = $servicePackageInput == $package->getCode() ? "selected='selected'" : "";
    $default = $selected == "" ? "selected='selected'" : "";
    $packageOptions .= "<option value='" . $package->getCode() . "' {$selected}>" . $package->getDesc() . "-P" . $package->getPrice() . "</option>";
}
$packageOptions = '<option value="" ' . $default . '>Select Package</option>' . $packageOptions;
$hourOptions = "";
$serviceHourInput = isset($_SESSION["formInput"]["service_hour"]) ? $_SESSION["formInput"]["service_hour"] : "";
for ($hr = 0; $hr < 24; $hr++) {
    $hour = $hr <= 9 ? "0" . $hr : $hr;
    $selected = $serviceHourInput == $hour ? "selected='selected'" : "";
    $hourOptions .= "<option value=" . $hour . " {$selected} >" . $hour . "</option>";
}
}
if ($isPast && !$isAdmin) {
    $filter["service_date"] = array($currentDate, LessThanOrEqual);
} elseif (!$isAdmin) {
    $filter["service_date"] = array($currentDate, GreaterThanOrEqual);
}
$serviceRequest = new ServiceRequest();
if ($isAdmin && !$clientID) {
    $allServiceRequest = $serviceRequest->getServiceRequest(array("service_date" => "ASC"), $filter);
} elseif ($clientID) {
    $allServiceRequest = $serviceRequest->getServiceRequest(array("service_date" => "ASC"), array("client_id" => array($clientID, Equal)));
} else {
    $allServiceRequest = $serviceRequest->getServiceRequest(array("service_date" => "ASC"), $filter);
}
$package = new Package();
$allPackages = $package->getPackages();
$packageOption = "";
foreach ($allPackages as $package) {
    $packageOption .= "<option value=" . $package->getCode() . ">" . $package->getDesc() . "</option>";
}
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>Kusina Sa Plaza</title>
    <link href="Styles/tables.css" rel="stylesheet" />
    <link href="Styles/tables-min.css" rel="stylesheet" />
    <link href="Styles/buttons-core-min.css" rel="stylesheet" />
Ejemplo n.º 6
0
                    <thead>
                    <tr>
                        <th class="table-checkbox"><input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes"/></th>
                        <th>Name</th>
                        <th>Cost</th>
                        <th>Credits</th>
                        <!-- <th>Services</th> -->
                        <th>Service Discount</th>
                        <th>Product Discount</th>
                        <th>Date Created</th>
                        <th>Action</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
$results = Package::getPackages();
if (count($results) > 0) {
    for ($index = 0; $index < count($results); $index++) {
        $rows = $results[$index];
        ?>
                        <tr class="<?php 
        echo ($index + 1) % 2 == 0 ? 'even' : 'odd';
        ?>
 gradeX">
                            <td> <input  name="delete[]" type="checkbox" id="delete[]" value="<?php 
        echo $rows['id'];
        ?>
" class="checkboxes" /> </td>
                            <td><?php 
        echo $general->subStr($rows['name'], 60);
        ?>