Inheritance: extends Base
Example #1
0
 private function getPreAuthPage()
 {
     $mainTag = new Html();
     $head = new Head();
     $head->addChild("\n            <title>Admin page</title>\n            <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>\n            <link rel='shortcut icon' href='images/system/favicon.ico' type='image/x-icon'/>\n            <link rel='stylesheet' type='text/css' href='/src/front/style/style-less.css'/>\n            <script type='text/javascript' src='/src/front/js/fixies.js'></script>\n            <script type='text/javascript' src='/src/front/js/ext/jquery.js'></script>\n            <script type='text/javascript' src='/src/front/js/ext/jquery-1.10.2.js'></script>\n            <script type='text/javascript' src='/src/front/js/ext/tinycolor.js'></script>\n            <script type='text/javascript' src='/src/front/js/v-utils.js'></script>\n            <script type='text/javascript' src='/src/front/js/utils.js'></script>\n            <script type='text/javascript' src='/src/front/js/admin.js'></script>\n            <script type='text/javascript' src='/src/front/js/components/vCore-effects.js'></script>\n            ");
     $body = new Body();
     $body->addChild("\n            <div class='admin_auth_container' >\n                <div class='auth_header f-20'>Авторизация</div>\n                <label class='f-15' for='user'>User</label>\n                <input id='user'>\n                <label class='f-15' for='password'>Password</label>\n                <input id='password' type='password'>\n                <button class='button f-20 input_hover'>Войти</button>\n            </div>\n            <script type='text/javascript'>\n                /*inputHoverModule.update();*/\n            </script>\n        ");
     return $mainTag->addChildList([$head, $body]);
 }
Example #2
0
 /**
  * 解析生成 Task\Body 对象
  * 
  * @param  array $params
  * @return \Ws\Http\Automated\Task\Body
  */
 public static function parse($params = [])
 {
     $obj = new Body();
     foreach ((array) $params['vars'] as $item) {
         $obj->setVar($item['name'], $item['value']);
     }
     foreach ((array) $params['requests'] as $item) {
         $obj->setRequest($item);
     }
     return $obj;
 }
Example #3
0
 public function getHtml()
 {
     $html = new Html();
     $head = new Head();
     $head->addChild("\n        <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>\n        <meta http-equiv='cache-control' content='max-age=0' />\n        <meta http-equiv='cache-control' content='no-cache' />\n        <meta http-equiv='expires' content='0' />\n        <meta http-equiv='expires' content='Tue, 01 Jan 1980 1:00:00 GMT' />\n        <meta http-equiv='pragma' content='no-cache' />\n        <link rel='stylesheet' type='text/css' href='/src/front/style/admin-page.css'>\n        ");
     $head->addChild(Components::getMenu());
     $head->addChildList($this->getHeadContent());
     $body = new Body();
     $body->addChildList($this->getGeneralContent());
     return $this->pagePrefix . $html->addChildList([$head, $body])->getHtml();
 }
Example #4
0
function convert_html($lines, $noPara = FALSE)
{
    global $vars, $digest;
    static $contents_id = 0;
    // Set digest
    $digest = md5(join('', get_source($vars['page'])));
    if (!is_array($lines)) {
        $lines = explode("\n", $lines);
    }
    $body = new Body(++$contents_id);
    $body->noPara = $noPara;
    $body->parse($lines);
    return $body->toString();
}
 /**
  * Create a new RequestBody.
  */
 public function __construct()
 {
     $stream = fopen('php://temp', 'w+');
     stream_copy_to_stream(fopen('php://input', 'r'), $stream);
     rewind($stream);
     parent::__construct($stream);
 }
Example #6
0
 /**
  * @return array|string
  */
 function jsonSerialize()
 {
     if (is_null($this->queryString)) {
         return parent::jsonSerialize();
     }
     return $this->queryString;
 }
Example #7
0
 /**
  * Runs the test.
  */
 public function test()
 {
     $html = file_get_contents(DIR_FILES . '/mail/email.html');
     $text = \Jyxo\Html::toText($html);
     // HTML and plaintext given
     $body = new Body($html, $text);
     $this->assertEquals($html, $body->getMain());
     $this->assertEquals($text, $body->getAlternative());
     $this->assertTrue($body->isHtml());
     // Only HTML
     $body = new Body($html);
     $this->assertEquals($html, $body->getMain());
     $this->assertTrue($body->isHtml());
     // Only plaintext
     $body = new Body($text);
     $this->assertEquals($text, $body->getMain());
     $this->assertFalse($body->isHtml());
 }
 public function index()
 {
     $this->layout->body_class = '';
     $zip_code = Input::query('zip_code', '');
     $distance = Input::query('distance', '50');
     if (empty($zip_code)) {
         $this->findLocation();
         $zip_code = Session::get('zip_code', '');
     }
     Session::put('zip_code', $zip_code);
     Session::put('distance', $distance);
     $data = array('search_text' => '', 'zip_code' => $zip_code, 'distance' => $distance, 'status' => $this->getStatus(), 'makes' => $this->getPropertiesList(Make::orderBy('make')->get(), 'make'), 'bodies' => $this->getPropertiesList(Body::orderBy('body')->get(), 'body'), 'transmissions' => $this->getPropertiesList(Transmission::orderBy('transmission')->get(), 'transmission'), 'drives' => $this->getPropertiesList(Drive::orderBy('drive')->get(), 'drive'), 'interiors' => $this->getPropertiesList(Interior::orderBy('interior', 'DESC')->take(10)->get(), 'interior'), 'exteriors' => $this->getPropertiesList(Exterior::orderBy('exterior', 'DESC')->take(10)->get(), 'exterior'), 'fuels' => $this->getPropertiesList(Fuel::orderBy('fuel')->get(), 'fuel'), 'doors_count' => $this->getDoorsCounts(), 'cylinders_count' => $this->getCylindersCounts());
     $this->layout->contents = View::make('search/search-advanced', $data);
 }
Example #9
0
 public function findSelectedFilter($filters, $aggregations, $body_filter)
 {
     if (!empty($body_filter)) {
         $values = array();
         $body_ranges = explode("-", $body_filter);
         foreach ($body_ranges as $body_range) {
             $bodies = Body::where('id', '=', $body_range);
             if ($bodies->count()) {
                 $title = $bodies->first()->body;
                 array_push($values, array("title" => $title, "index" => 'body-remove-' . $body_range));
             }
         }
         array_push($filters, array("name" => "Body Style", "values" => $values, "modal" => "body"));
     }
     return $filters;
 }
Example #10
0
 /**
  * Create a new response object from an array
  *
  * @param string $statusCode
  * @param array  $data
  *
  * @return Response
  */
 public static function createFromArray($statusCode, array $data = [])
 {
     $response = new static($statusCode);
     if (isset($data['body']) && is_array($data['body'])) {
         foreach ($data['body'] as $key => $bodyData) {
             $response->addBody(Body::createFromArray($key, $bodyData ?: []));
         }
     }
     if (isset($data['description'])) {
         $response->setDescription($data['description']);
     }
     if (isset($data['headers'])) {
         foreach ($data['headers'] as $key => $header) {
             $response->addHeader(NamedParameter::createFromArray($key, $header));
         }
     }
     return $response;
 }
Example #11
0
 public function copy()
 {
     $body = new Body();
     $body->setColor($this->getColor());
     return $body;
 }
Example #12
0
 /**
  * Add a new body
  *
  * @param Body $body
  */
 public function addBody(Body $body)
 {
     $this->bodyList[$body->getMediaType()] = $body;
 }
Example #13
0
    }
} else {
    $sessie->unsetS('psa-dir');
    $sessie->unsetS('psa-ext');
    $sessie->unsetS('psa-db');
    $cmd->setValue('base');
    $submit->setValue('Go');
    $html = new Page();
    $html->setLanguage('nl_NL');
    $html->build();
    $head = new Head();
    $head->setTitle('PSA - homepage');
    $head->setCss('./css/psa.css');
    $head->setJs('./js/PSA.js');
    $head->build();
    $body = new Body();
    $body->build();
    include_once './inc/menubar.php';
    $body->line('
	<p>Databases will be selected based on the preset directory and extension.
	Currently the following are stored : </p>');
    include_once './forms/form_base.php';
    $body->line('<hr />
	<p>PSA stands for PHP - SQLite - Administration. This application lets you
	do the basic operations with SQLite3 databases. The current version only
	supports the very basics. Check <a href="controller.php?cmd=bts">[here]</a> for
	more information.</p>
	<p>	The following issues are already implemented :</p>
	<ul>
		<li>select directory and extension</li>
		<li>list databases based on the above</li>
Example #14
0
 function Sun()
 {
     return Body::NewBody(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SOLAR_MASS);
 }
Example #15
0
* [name] query_results.php
* [package] psa
* [since] 2010.09.22 -ok
*/
$res = unserialize($sessie->getS('psa-results'));
$sessie->unsetS('psa-results');
$html = new Page();
$html->setLanguage('nl_NL');
$html->build();
$head = new Head();
$head->setCharset('UTF-8');
$head->setTitle('PSA - query results');
$head->setCss('./css/psa.css');
$head->setJs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
$body->line('Executed query : <br />');
$body->line('<p class="qs">' . $sessie->getS('psa-query-results') . '<hr />');
$sessie->unsetS('psa-query-results');
$titles = FALSE;
if (!$res) {
    $body->line('no further feedback');
} else {
    $table = new Table();
    $table->setClas('result');
    $table->setId('listing');
    $table->build();
    $odd = TRUE;
    foreach ($res as $item) {
Example #16
0
} else {
    $q = "SELECT ROWID as id,* FROM " . $req->get('table') . "  ";
}
$sql->qo($q);
$res = $sql->fo();
// echo "BOTTOM WAARDE  : <b><h1>".$sessie->getS('bottom')."</h1></b>";
$html = new Page();
$html->setLanguage('nl_NL');
$html->build();
$head = new Head();
$head->setCharset('UTF-8');
$head->setTitle('PSA - query results');
$head->setCss('./css/psa.css');
$head->setjs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
$body->line('<h3>Table : ' . $req->get('table') . '</h3>');
$odd = FALSE;
if (!$res) {
    $body->line('Table does not contain records');
} else {
    $resultset = '';
    foreach ($res as $item) {
        $insert = 'INSERT INTO ' . $req->get('table') . ' (';
        for ($i = 0; $i < sizeof($col); ++$i) {
            // var_dump($col);
            // echo "$col[$i] - waarde = ".$item->$col[$i].'<br />';
            $insert .= $col[$i] . ', ';
            $vals[] = $item->{$col}[$i];
Example #17
0
File: bts.php Project: broozer/psa
* [type] file
* [name] bts.php
* [package] psa
* [since] 2011.02.10
* [expl] documentation avant la lettre - Behind The Screens
*/
$html = new Page();
$html->setLanguage('nl_NL');
$html->build();
$head = new Head();
$head->setCharset('UTF-8');
$head->setTitle('PSA - connection');
$head->setCss('./css/psa.css');
$head->setJs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
$body->line('<div class="xemel">');
$xml = simplexml_load_file('./inc/bts.xml');
// menu
foreach ($xml->item->caption as $cap) {
    $link = new Link();
    // $link->setHref('#'.$cap->name);
    $body->line('<a href="#' . $cap->name . '" >' . $cap->name . '</a><br />');
}
$body->line('<hr />');
// content
foreach ($xml->item->caption as $cap) {
    $body->line('<h3><a name="' . $cap->name . '">' . $cap->name . '</a></h3>');
    foreach ($cap->para as $paraf) {
Example #18
0
 public function addBody(Body $body)
 {
     $this->_bodies[$body->getMediaType()] = $body;
     return $this;
 }
Example #19
0
$q = "PRAGMA table_info('" . $req->get('table') . "')";
$sql->qo($q);
$res = $sql->fo();
foreach ($res as $item) {
    $fields[] = $item->name;
}
$html = new Page();
$html->setLanguage('nl_NL');
$html->build();
$head = new Head();
$head->setCharset('UTF-8');
$head->setTitle('PSA - create index');
$head->setCss('./css/psa.css');
$head->setJs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
$body->line("Index creation on table : <b>" . $req->get('table') . "</b><br>");
$form = new Form();
$form->setAction('controller.php');
$form->setJs(' onsubmit="return PSA.indexcol();" ');
$form->build();
// TODO: check if table name already exists
$name = new Input();
$name->setName('idxname');
$name->setSize(50);
$name->setMaxlength(128);
$name->setId('idxname');
$body->line('Name : ' . $name->dump() . ' ' . $cmd->dump() . '<br>');
for ($i = 0; $i < sizeof($fields); ++$i) {
Example #20
0
    $q = "SELECT * FROM " . $req->get('table') . " WHERE id = " . $req->get('id');
} else {
    $q = "SELECT * FROM " . $req->get('table') . " WHERE ROWID = " . $req->get('id');
}
$sql->qo($q);
$res = $sql->fo_one();
// var_dump($res);
$html = new Page();
$html->setLanguage('nl_NL');
$html->build();
$head = new Head();
$head->setCharset('UTF-8');
$head->setTitle('PSA - edit record');
$head->setCss('./css/psa.css');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
$form = new Form();
$form->setAction('controller.php');
$form->build();
$table = new Table();
$table->build();
$i = 0;
$inp = new Input();
$inp->setName('data_id');
$inp->setValue($req->get('id'));
$inp->setType('hidden');
$data_table = new Input();
$data_table->setName('data_table');
$data_table->setValue($req->get('table'));
Example #21
0
    $newRating = new Rater($other_id);
    $newRating->output();
} else {
    if ($case3) {
        //Show the pickup countdown
        $newPickup = new Pickup($duedate);
        $newPickup->output();
    } else {
        //If the meeting date has not been determined...
        if ($meetdt == 0) {
            //...show the calender
            $newCal = new Calender(trim($oid));
            $newCal->output();
        } else {
            //...print out the countdown to the meetup
            $newMeetup = new Meetup($meetdt);
            $newMeetup->output();
        }
    }
}
echo "</div>";
//Close the main container
?>
			<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true"></script>
			<script type="text/javascript" src="/lib/min/?g=js"></script>

<?php 
Body::end(false);
HTML::end();
mysqli_close($con);
//Close the existing MySQL connection
 public function adsParameter()
 {
     $make_input = Input::get('make', '');
     $model_input = Input::get('model', '');
     $body_input = Input::get('body', '');
     $status_input = Input::get('status', '');
     $statuses = '';
     $makes = '';
     $models = '';
     $bodies = '';
     $new_status_id = '';
     $used_status_id = '';
     $status_values = Status::all();
     foreach ($status_values as $status) {
         if ($status->status == 'Used') {
             $used_status_id = $status->id;
         } else {
             if ($status->status == 'New') {
                 $new_status_id = $status->id;
             }
         }
     }
     if ($status_input == $new_status_id) {
         $statuses = 'New-';
     } else {
         if ($status_input == $used_status_id) {
             $statuses = 'Used-';
         }
     }
     foreach (explode("-", $make_input) as $make) {
         $entities = Make::where('id', '=', $make);
         if ($entities->count()) {
             $entity = $entities->first();
             $makes = $makes . $entity->make . '-';
         }
     }
     foreach (explode("-", $model_input) as $model) {
         $entities = Model::where('id', '=', $model);
         if ($entities->count()) {
             $entity = $entities->first();
             $models = $models . $entity->model . '-';
         }
     }
     foreach (explode("-", $body_input) as $body) {
         $entities = Body::where('id', '=', $body);
         if ($entities->count()) {
             $entity = $entities->first();
             $bodies = $bodies . $entity->body . '-';
         }
     }
     $ads = '';
     if (!empty($statuses)) {
         $ads = $ads . $statuses;
     }
     if (!empty($makes)) {
         $ads = $ads . $makes;
     }
     if (!empty($models)) {
         $ads = $ads . $models;
     }
     if (!empty($bodies)) {
         $ads = $ads . $bodies;
     }
     if (!empty($ads)) {
         $ads = substr($ads, 0, -1);
     }
     return Response::json(array('ads' => $ads));
 }
Example #23
0
$inp_naam->setName('name');
$inp_naam->setSize(20);
$inp_naam->setAutofocus(true);
$inp_pass = new Input();
$inp_pass->setName('geheim');
$inp_pass->setType('password');
$inp_pass->setSize(20);
$html = new Page();
$html->setLanguage('nl-nl');
$html->build();
$head = new Head();
$head->setTitle('PSA - login');
$head->setCss('./css/psa.css');
$head->setJs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
$body->line('<h3>PHP SQLite Admin tool - log in</h3>');
$form = new Form();
$form->setAction('login.php');
$form->build();
$table = new Table();
$table->build();
$tr = new Tr();
$tr->add('Login');
$tr->add($inp_naam->dump());
$tr->build();
$tr = new Tr();
$tr->add('Pass');
$tr->add($inp_pass->dump());
$tr->build();
Example #24
0
$q = "SELECT name FROM sqlite_master WHERE type = 'table' ORDER BY name";
// echo $q;
// $sql->qo('PRAGMA table_info('.$req->get('name').')');
$sql->qo($q);
$res = $sql->fo();
// unset($sql);
$html = new Page();
$html->setLanguage('nl_NL');
$html->build();
$head = new Head();
$head->setCharset('UTF-8');
$head->setTitle('PSA - show tables');
$head->setCss('./css/psa.css');
$head->setjs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
$body->line();
$link = new Link();
$link->setHref('controller.php?cmd=table_add');
$link->setClas('butter');
$link->setName('Add table');
$link->build();
$body->line('<hr>');
if (!$res) {
    $body->line('No tables defined.');
} else {
    $body->line('<h3>List tables</h3>');
    $table = new Table();
    $table->setClas('result');
Example #25
0
        case 2:
            //Redirect
            header("Location:/me");
            exit;
            break;
    }
}
//Close the connection
mysqli_close($con);
HTML::begin();
Head::make("Terms and Conditions");
Body::begin();
?>

			<div id="trmcnt" style="margin-top:20px;margin-bottom:20px;">
				<h1 class="uk-text-center" style="padding-bottom:1em;">Agreeing to the Terms of Service</h1>
				<div id="trmbx" style="white-space:normal;">
					<?php 
//Get the terms out of the HTM file
echo file_get_contents("terms.htm");
?>
				</div>

				<div class="text_medium uk-text-center" style="padding-top:10px;padding-bottom:10px;">You must agree to the above terms before you can create your account.</div>
				<div class="uk-text-center">
					<a href="/signup/validate.php" class="button_primary green">I Agree</a>
					<a class="button_primary red" href="javascript:void(0);" onclick="logout();">I Refuse</a>
				</div>
<?php 
Body::end();
HTML::end();
Example #26
0
 */
$sql = new LitePDO('sqlite:' . $sessie->getS('psa-dir') . '/' . $sessie->getS('psa-db') . '.' . $sessie->getS('psa-ext') . '');
$q = "PRAGMA table_info('" . $req->get('table') . "')";
$sql->qo($q);
$res = $sql->fo();
// var_dump($res);
$html = new Page();
$html->setLanguage('nl_NL');
$html->build();
$head = new Head();
$head->setCharset('UTF-8');
$head->setTitle('PSA - show table info for ' . $req->get('table'));
$head->setCss('./css/psa.css');
$head->setJs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
$body->line('<h3>Structure for table : <b>' . $req->get('table') . '</b></h3>');
$table = new Table();
$table->setClas('result');
$table->setId('listing');
$table->build();
$th = new Th();
$th->add('name');
$th->add('type');
$th->add('size');
$th->add('null allowed');
$th->add('default');
$th->add('remove');
$th->build();
Example #27
0
 /**
  * Create a new Method from an array
  *
  * @param string        $method
  * @param array         $data
  * [
  *  body:               ?array
  *  headers:            ?array
  *  description:        ?string
  *  protocols:          ?array
  *  responses:          ?array
  *  queryParameters:    ?array
  * ]
  * @param ApiDefinition $apiDefinition
  *
  * @throws \Exception
  *
  * @return Method
  */
 public static function createFromArray($method, array $data = [], ApiDefinition $apiDefinition = null)
 {
     $method = new static($method, $apiDefinition);
     if (isset($data['body'])) {
         foreach ($data['body'] as $key => $bodyData) {
             if (in_array($key, WebFormBody::$validMediaTypes)) {
                 $body = WebFormBody::createFromArray($key, $bodyData);
             } else {
                 $body = Body::createFromArray($key, $bodyData);
             }
             $method->addBody($body);
         }
     }
     if (isset($data['headers'])) {
         foreach ($data['headers'] as $key => $header) {
             $method->addHeader(NamedParameter::createFromArray($key, $header));
         }
     }
     if (isset($data['description'])) {
         $method->setDescription($data['description']);
     }
     if (isset($data['baseUriParameters'])) {
         foreach ($data['baseUriParameters'] as $key => $baseUriParameter) {
             $method->addBaseUriParameter(BaseUriParameter::createFromArray($key, $baseUriParameter));
         }
     }
     if (isset($data['protocols'])) {
         foreach ($data['protocols'] as $protocol) {
             $method->addProtocol($protocol);
         }
     }
     if (isset($data['responses']) && is_array($data['responses'])) {
         foreach ($data['responses'] as $responseCode => $response) {
             $method->addResponse(Response::createFromArray($responseCode, $response ?: []));
         }
     }
     if (isset($data['queryParameters'])) {
         foreach ($data['queryParameters'] as $key => $queryParameterData) {
             $method->addQueryParameter(NamedParameter::createFromArray($key, $queryParameterData));
         }
     }
     if (isset($data['securedBy'])) {
         foreach ($data['securedBy'] as $key => $securedBy) {
             if ($securedBy) {
                 $method->addSecurityScheme($apiDefinition->getSecurityScheme($securedBy));
             } else {
                 $method->addSecurityScheme(SecurityScheme::createFromArray('null', array(), $apiDefinition));
             }
         }
     }
     return $method;
 }
 public function bodyStateCity($id)
 {
     $this->layout->body_class = '';
     $body = Body::find(explode("-", $id)[0]);
     $state = null;
     foreach ($this->getStates() as $entity) {
         if (explode("-", $id)[1] == $entity['code']) {
             $state = $entity;
             break;
         }
     }
     $columns = array(array(), array(), array());
     $cities = DB::select(DB::raw("SELECT DISTINCT city FROM vehicle WHERE body = :body AND state = :state ORDER BY city"), array('body' => $body->id, 'state' => $state['code']));
     foreach ($cities as $key => $value) {
         $location = Location::where('state', '=', $state['code'])->where('city', '=', $value->city);
         if ($location->count()) {
             $zip = $location->first()->zip_code;
             $link = '/search?body=' . $body->id . '&zip_code=' . $zip . '&distance=50&page=1&sort=price-1';
             $title = $body->body . ' for sale near ' . $value->city . ', ' . $state['code'];
             $city = array('link' => $link, 'title' => $title);
             array_push($columns[$key % 3], $city);
         }
     }
     $data = array('search_text' => '', 'body' => $body, 'state' => $state, 'columns' => $columns);
     $this->layout->contents = View::make('browse/body-state-city', $data);
 }
Example #29
0
 public function __construct()
 {
     $this->company = new Company();
     switch ($_GET['id']) {
         case 98:
             $this->header('Repair Balance Errors');
             FinancialReports::RepairTXBalanceErrors();
             break;
         case 99:
             $this->header('Transaction Audit');
             //FinancialReports::TXAudit();
             break;
         case 100:
             $this->header('Profit & Loss Statement');
             FinancialReports::PLStatement();
             break;
         case 101:
             $this->header('Trial Balance');
             FinancialReports::TrialBalance();
             break;
         case 102:
             $this->header('Balance Sheet');
             FinancialReports::BalanceSheet();
             break;
         case 103:
             $this->header('Statement of Cash Flows');
             FinancialReports::CashFlows();
             break;
         case 110:
             $this->header("Transactions report");
             FinancialReports::TransactionsReport();
             break;
         case 111:
             $this->header('Ledger Statements');
             FinancialReports::LedgerStatement();
             break;
         case 112:
             $this->header('Cash Book');
             FinancialReports::CashBook();
             break;
         case 113:
             $this->header('Credit Book');
             FinancialReports::CreditBook();
             break;
         case 114:
             $this->header('Debtors List');
             FinancialReports::DebtorsRegister();
             break;
         case 115:
             $this->header('Creditors List');
             FinancialReports::CreditorsRegister();
             break;
         case 120:
             $this->header('Revenue Report');
             FinancialReports::SalesReport();
             break;
         case 121:
             $this->header('Revenue By User');
             FinancialReports::SalesByUser();
             break;
         case 122:
             $this->header('Revenue By Item');
             FinancialReports::SalesByItem();
             break;
         case 123:
             $this->header('Revenue By Client');
             FinancialReports::SalesByClient();
             break;
         case 130:
             $this->header('Expenses Report');
             FinancialReports::ExpensesReport();
             break;
         case 131:
             $this->header('Expenses By Category');
             FinancialReports::ExpensesByCategory();
             break;
         case 132:
             $this->header('Expenses By Description');
             FinancialReports::ExpensesByDescription();
             break;
         case 133:
             $this->header('Expenses By Context');
             FinancialReports::ExpensesByContext();
             break;
         case 134:
             $this->header('Claims Per Employee');
             Body::ClaimsPerEmployee();
             break;
         case 200:
             $this->header('Client Register');
             Body::ClientRegister();
             break;
         case 201:
             $this->header('Client Quotations');
             Body::ClientQuotations();
             break;
         case 202:
             $this->header('Client Statement');
             Body::ClientStatement();
             break;
         case 203:
             $this->header('All Sales Invoices');
             Body::AllClientInvoices();
             break;
         case 204:
             $this->header('All Quotations');
             Body::AllClientQuotations();
             break;
         case 300:
             $this->header('Supplier Register');
             Body::SupplierRegister();
             break;
         case 301:
             $this->header('Supplier Orders');
             Body::SupplierOrders();
             break;
         case 302:
             $this->header('Supplier Statement');
             Body::SupplierStatement();
             break;
         case 303:
             $this->header('All Purchase Invoices');
             Body::PurchaseInvoices();
             break;
         case 304:
             $this->header('All Purchase Orders');
             Body::PurchaseOrders();
             break;
         case 400:
             $this->header('Employee Register');
             HRReports::EmployeeRegister();
             break;
         case 401:
             $this->header('Employee Statement');
             HRReports::EmployeeStatement();
             break;
         case 410:
             $this->header('Employee Advances');
             HRReports::EmployeeAdvances();
             break;
         case 411:
             $this->header('Employee Allowances');
             HRReports::EmployeeAllowances();
             break;
         case 412:
             $this->header('Employee Overtime');
             HRReports::EmployeeOvertime();
             break;
         case 413:
             $this->header('Payroll Summary');
             HRReports::PayrollSummary();
             break;
         case 500:
             $this->header('All Projects');
             ProjectReports::ProjectsRegister();
             break;
         case 501:
             $this->header('Project Report');
             ProjectReports::ProjectReport();
             break;
         case 502:
             $this->header('Client Receipts - Minor Works');
             ProjectReports::MinorWorksReceipts();
             break;
         default:
             # code...
             break;
     }
     $this->footer();
 }
Example #30
0
 public function createBody()
 {
     $body = new Body();
     $body->addStyleClass($this->getPageCode());
     return $body;
 }