Example #1
0
 public function __construct()
 {
     // Register filters
     $this->filter('parseText', '$this->parseText');
     $this->filter('formatFilesize', '$this->formatFilesize');
     parent::__construct();
 }
Example #2
0
 public function __construct($_parameters)
 {
     parent::__construct($_parameters);
     $this->tags["content"] = $this->makePage($_parameters["page"]["project"]);
     $this->tags["menu"] = $this->makeMenu($_parameters["page"]["project"]);
     $this->addFile("js/detail.min.js");
 }
Example #3
0
 public function __construct(stdClass $langObject)
 {
     parent::__construct();
     $this->assign('currentTemplate', $this->tplFilename);
     $this->assign('language', $langObject);
     $this->initTemplate();
 }
Example #4
0
 public function __construct()
 {
     //exit(json_encode(func_get_args()));
     if (func_num_args() == 1) {
         $n = func_get_arg(0);
         //exit(json_encode($n));
         parent::__construct($n->Key, $n->Id);
         $this->setReceiptNumber($n->receiptNumber);
         $this->setDate($n->date, $n->period);
         $this->setTaxType($n->taxTypeID);
         $this->setAmountZMK($n->amount_zmk);
         $this->setAmountUSD($n->amount_usd);
         $this->setAgentFees($n->agent_fees);
         $this->setPeriodStart($n->periodStart, $n->period);
         $this->setPeriodEnd($n->periodEnd, $n->period);
         $this->setComments($n->comments);
         $this->setReceipt($n->receipt);
     } else {
         $this->setDate(func_get_arg(0));
         $this->setReceiptNumber(func_get_arg(1));
         $this->setTaxType(func_get_arg(2));
         $this->setAmountZMK(func_get_arg(4));
         $this->setAmountUSD(func_get_arg(5));
         $this->setAgentFees(func_get_arg(6));
         $this->setPeriodStart(func_get_arg(7));
         $this->setPeriodEnd(func_get_arg(8));
         $this->setComments(func_get_arg(9));
         $this->setReceipt(func_get_arg(10));
     }
 }
Example #5
0
 public function __construct(stdClass $langObject)
 {
     parent::__construct();
     $this->assign('language', $langObject);
     $this->mainObject = new TPL_Main($langObject);
     $this->initFrame();
 }
Example #6
0
 public function __construct($_parameters)
 {
     //["i"], [false]
     parent::__construct($_parameters);
     if (isset($_parameters["page"]["skip"]) && $_parameters["page"]["skip"] != true) {
         $this->addModule(new Form());
         $this->addModule(new Button());
         $this->addModule(new Table());
         $this->addModule(new Popup());
         $this->modules["Form"]->addConnection("base", $this->currentConnection);
         $this->modules["Table"]->addConnection("base", $this->currentConnection);
         $this->modules["Table"]->modules["Form"]->addConnection("base", $this->currentConnection);
         $this->data["table"] = "anagrafica";
         $this->data["linkView"] = "anagrafica_v";
         $this->data["formName"] = "formAna";
         if ($_parameters["page"][0] == "i") {
             $this->tags["content"] .= $this->drawPageInsert();
         }
         if ($_parameters["page"][0] == "f") {
             $this->tags["content"] .= $this->drawPageFind();
         }
         if ($_parameters["page"][0] == "v") {
             $this->tags["content"] .= $this->drawPageView();
         }
     }
 }
Example #7
0
 /**
  * Constructor
  *
  * @param $controller Controller
  * @return TemplateCache
  * @author Justin Palmer
  **/
 public function __construct($controller)
 {
     parent::__construct($controller);
     $this->cache_type = Registry::get('pr-cache-template');
     if ($this->isValidCacheType()) {
         $this->factory();
     }
 }
Example #8
0
 public function __construct($n)
 {
     parent::__construct(isset($n->Key) ? $n->Key : $n->pepID, isset($n->Id) ? $n->Id : '');
     $this->setName($n->name);
     $this->setPublicOfficePosition($n->publicOfficePosition);
     $this->setDateOfficeAssumed($n->dateOfficeAssumed);
     $this->setDateOfficeLeft($n->dateOfficeLeft);
 }
Example #9
0
 /**
  * Constructor
  * @param string $tplName The name of the Template file (without .xml)
  */
 public function __construct($tplName)
 {
     parent::__construct($tplName);
     // Render as XML
     $this->setOutputMode(\PHPTAL::XML);
     // Strip comments
     $this->stripComments(false);
 }
Example #10
0
 public function __construct($n)
 {
     parent::__construct($n->Key, $n->Id);
     $this->setReferenceNumber($n->refNumber);
     $this->setPaymentZMW($n->paid_received_zmw);
     $this->setPaymentUSD($n->paid_received_usd);
     $this->setComments($n->comments);
 }
Example #11
0
 /**
  * Создание экземпляра класса из файла
  * @param string $fileSpec полная спецификация имени файла.
  */
 function __construct($fileSpec)
 {
     try {
         $tpl = file_get_contents($fileSpec);
     } catch (\Exception $e) {
         echo 'Exception: ', $e->getMessage(), "\n";
     }
     parent::__construct($tpl);
 }
Example #12
0
 public function __construct($n)
 {
     parent::__construct(isset($n->Key) ? $n->Key : $n->beneficialOwnerID, isset($n->Id) ? $n->Id : '');
     $this->setBeneficialOwner($n->beneficialOwner);
     $this->setNameOftheEntity($n->nameOftheEntity);
     $this->setNationalityOftheEntity($n->nationalityOftheEntity);
     $this->setInterest($n->interest);
     $this->setIsListedEntity($n->isListedEntity);
     $this->setStockExchange($n->stockExchange);
 }
 /**
  * @see Template::__construct()
  */
 public function __construct($languageID = 0, $templatePaths = array(), $pluginDir = '', $compileDir = '')
 {
     if (!$templatePaths) {
         $templatePaths = WCF_DIR . 'acp/templates/';
     }
     if (!$compileDir) {
         $compileDir = WCF_DIR . 'acp/templates/compiled/';
     }
     parent::__construct($languageID, $templatePaths, $pluginDir, $compileDir);
 }
Example #14
0
 public function __construct($n)
 {
     parent::__construct(isset($n->Key) ? $n->Key : $n->detailsID, isset($n->Id) ? $n->Id : '');
     $this->setProjectDescription($n->projectDescription);
     $this->setProjectLocation($n->locationOfProject);
     $this->setTotalBudgetOfEngagementProject($n->projectBudget);
     $this->setValueOfProjectIncurred($n->valueOfProjectInYear);
     $this->setCumulatedValueOfProjectIncurred($n->cummulativeValueOfProject_eoy);
     $this->setTermsOfTransactionAndLegalBasis($n->terms_legalBasis);
 }
Example #15
0
 /**
  * Constructor
  * @param string $tplName The name of the Template file (without .xml)
  * @param string $title The title of the Meta Box (should be translated)
  * @param array $postTypes The post types to limit the meta box to, empty array for all post types
  * @param string $context The position of the meta box (default, side, advanced)
  * @param string $priority The priority of the metabox (low, default, high)
  */
 public function __construct($tplName, $title, $postTypes = array(), $context = 'advanced', $priority = 'default')
 {
     parent::__construct($tplName);
     $this->postTypes = $postTypes;
     $this->name = $tplName;
     $this->title = $title;
     $this->context = $context;
     $this->priority = $priority;
     add_action('add_meta_boxes', array($this, 'addMetaBoxAction'));
     add_action('save_post', array($this, 'savePostAction'));
 }
Example #16
0
 public function __construct($_parameters)
 {
     parent::__construct($_parameters);
     $this->phpmyadmin = "http://192.168.10.37";
     $this->addModule(new Popup());
     $this->addFile("js/home.min.js");
     $this->tags["menu"] = $this->makeMenu();
     $this->tags["content"] = $this->makePage();
     $this->tags["footer"] = "";
     $this->tags["outContent"] = $this->modules["Popup"]->draw();
 }
Example #17
0
 public function __construct($n)
 {
     parent::__construct(isset($n->Key) ? $n->Key : $n->loanID, isset($n->Id) ? $n->Id : '');
     $this->setBeneficiary($n->beneficiaryID);
     $this->setTotalLoanAmount($n->amount);
     $this->setDateOfGrant($n->dateOfGrant);
     $this->setRepaymentPeriod($n->repaymentPeriod);
     $this->setInterestRate($n->interestRate);
     $this->setOutstandingAmount($n->amountOutstandingYearEnd);
     $this->setAmountReimbursed($n->amountPayedInYear);
     $this->setOtherComments($n->comments);
 }
Example #18
0
 public function __construct($n)
 {
     //exit(json_encode(['success'=>false, 'err'=>$n]));
     parent::__construct($n->Key, $n->Id);
     $this->setBeneficiaryID($n->beneficiaryID);
     $this->setBeneficiary($n->beneficiary);
     $this->setLocation($n->location);
     $this->setCashAmount($n->cash);
     $this->setDate($n->date);
     $this->setDescription($n->description);
     $this->setIncurredCost($n->incurred_cost);
 }
Example #19
0
 /**
  * Constructor
  * @param string $tplName The name of the Template file (without .xml)
  */
 public function __construct($tplName)
 {
     parent::__construct($tplName);
     $this->name = $tplName;
     $this->saveSettingsAction();
     // Add a nonce field so we can check for it later.
     $this->setTalData('settingsNonce', wp_nonce_field(strtolower($this->name) . '_settings', strtolower($this->name) . '_settings_nonce', true, false));
     // Get previously saved metadata for this box if any
     $this->options = get_option('_settings' . $this->name, true);
     if (isset($this->options) && is_array($this->options)) {
         $this->setTalData($this->options);
     }
 }
Example #20
0
 public function __construct($n)
 {
     parent::__construct(isset($n->Key) ? $n->Key : $n->interestID, isset($n->Id) ? $n->Id : '');
     $this->setExtractiveCompany($n->TPIN);
     $this->setInterestStart($n->percent_interest_1st);
     $this->setInterestEnd($n->percent_interest_2nd);
     $this->setNatureOfTransaction($n->nameOfTransaction);
     $this->setValueOfTransaction($n->valueOfTransaction_ZMW);
     $this->setTermsOfTransactionPayment($n->termsOfTransaction);
     $this->setBeneficiaryOfTransactionCounterpary($n->beneficiaryOfTransaction);
     $this->setStateResponsibilityToCoverProjectExpenses($n->isresponsible_for_expenses);
     $this->setTermsAttachedToEquityStake($n->terms_attached_for_equity);
 }
Example #21
0
 public function __construct(\Request $request, \Http\ErrorResponse $response)
 {
     $vars = array();
     $vars['url'] = $request->getUrl();
     $vars['method'] = $request->getMethod();
     $vars['module'] = $request->getModule();
     $vars['code'] = $response->getCode();
     $vars['phrase'] = $response->getPhrase();
     $vars['backtrace'] = $response->getBacktrace();
     $vars['exception'] = $response->getException();
     $this->code = $vars['code'];
     parent::__construct($vars, PHPWS_SOURCE_DIR . 'Global/Templates/Http/HtmlError.html', false);
 }
Example #22
0
 public function __construct($params = array())
 {
     $conf = Config::getInstance();
     $resources = new Resources();
     Plugins::dispatchAll("resources", $resources);
     foreach ($conf->get("scripts", array()) as $script) {
         $resources->add($script);
     }
     foreach (Plugins::findAll("www/app") as $dir) {
         $resources->addDir($dir);
     }
     $params["scripts"] = $resources->getScripts();
     $params["stylesheets"] = $resources->getStylesheets();
     parent::__construct($params);
 }
Example #23
0
 public function __construct(&$project, $path)
 {
     parent::__construct($project, $path);
     // Unique Stuff
     $this->output = end(explode(DIRECTORY_SEPARATOR, $path));
     $tempPath = str_replace($this->project->SitePath, "", $this->path);
     /*
             $this->uri = substr($tempPath, 0, strlen($tempPath) - strlen($this->output));
             if ( substr($this->uri, 0, 1) != '/' )
             {
                 $this->uri = "/" . $this->uri;
             }
     */
     $temp = explode(".", $this->output);
     $this->name = strtolower($temp[0]);
 }
Example #24
0
 function __construct($thisurl, $template = 'base.tpl')
 {
     parent::__construct($template);
     $this->object = array();
     $this->assign('title', APP_NAME);
     $this->assign('formaction', $thisurl);
     $this->assign('doctype', "<!DOCTYPE html>");
     // We obtain the mode
     $this->mode = getvar('mode', 'show');
     $this->order = getvar('order', '');
     // We use a dummy object to generate the needed elements for the canvas.
     $this->common = new Element();
     $this->common->addMeta('content-type', 'text/html;charset=utf-8');
     $this->common->addCSSRef(APP_URL . 'files/gen.css.php');
     $this->common->addScriptRef(APP_URL . 'files/gen.js');
     $this->common->setFormVar('mode', $this->mode);
     $this->common->setFormVar('order', $this->order);
 }
Example #25
0
 public function __construct($n)
 {
     //exit(json_encode($n));
     parent::__construct(isset($n->Key) ? $n->Key : $n->privateStakeholderID, isset($n->Id) ? $n->Id : '');
     $this->setName($n->name);
     $this->setDateOfBirth($n->dateOfBirth);
     $this->setNationalIdentifyNumber($n->nationalIdentifyNumber);
     $this->setNationality($n->nationality);
     $this->setCountryOfResidence($n->countryOfResidence);
     $this->setNumberOfShares($n->numberOfShares);
     $this->setPercentOfShares($n->percentOfShares);
     $this->setPercent_DirectVotingRights($n->percent_DirectVotingRights);
     $this->setPercent_IndirectVotingRights($n->percent_IndirectVotingRights);
     $this->setOther($n->other);
     $this->setDate($n->date);
     $this->setResidentialService($n->residentialService);
     $this->setOtherContactdetails($n->otherContactDetails);
 }
Example #26
0
 public function __construct($n)
 {
     parent::__construct($n->Key, $n->Id);
     $this->setTypeID($n->typeID);
     $this->setTypeName($n->typeName, $n->typeID);
     $this->setJan($n->jan);
     $this->setFeb($n->feb);
     $this->setMar($n->mar);
     $this->setApr($n->april);
     $this->setMay($n->may);
     $this->setJun($n->jun);
     $this->setJul($n->jul);
     $this->setAug($n->aug);
     $this->setSep($n->sep);
     $this->setOct($n->oct);
     $this->setNov($n->nov);
     $this->setDec($n->dec_r);
 }
Example #27
0
 /**
  * @param $tpl
  * @param array $js
  * @param array $css
  */
 public function __construct($tpl, array $js, array $css)
 {
     $this->js = $js;
     $this->css = $css;
     parent::__construct($tpl);
 }
Example #28
0
 public function __construct(OsuSignature $signature)
 {
     parent::__construct($signature);
     $user = $signature->getUser();
     $this->setCard(new CardRegular($user));
     $isCountryRank = isset($_GET['countryrank']);
     $removeAvatarMargin = isset($_GET['removeavmargin']);
     $showPP = isset($_GET['pp']);
     $pp = $showPP ? $_GET['pp'] : -1;
     $darkHeader = isset($_GET['darkheader']);
     $showRankedScore = isset($_GET['rankedscore']);
     $showXPBar = isset($_GET['xpbar']);
     if ($showPP && ($pp < 0 || $pp > 3)) {
         $errorImage = new ErrorImage();
         $errorImage->generate("Invalid parameter", "Parameter 'pp' has an\ninvalid value");
     }
     $userRank = $user['pp_rank'];
     $userRank = $userRank ? $userRank : '?';
     $userCountryRank = $user['pp_country_rank'];
     $userCountryRank = $userCountryRank ? $userCountryRank : '?';
     $mode = isset($_GET['mode']) ? $_GET['mode'] : 'osu';
     $iconmode = 0;
     switch ($mode) {
         case 0:
             $mode = 'osu';
             $iconmode = 0;
             break;
         case 1:
             $mode = 'taiko';
             $iconmode = 3;
             break;
         case 2:
             $mode = 'ctb';
             $iconmode = 2;
             break;
         case 3:
             $mode = 'mania';
             $iconmode = 1;
             break;
     }
     $username = $user['username'];
     $ppText = $user['pp_raw'];
     $accuracy = $user['accuracy'];
     $playcount = $user['playcount'];
     $level = $user['level'];
     $headerTextColour = $darkHeader ? '#555555' : '#FFFFFF';
     $avatar = new ComponentAvatar($signature, CardRegular::SIG_MARGIN + ($removeAvatarMargin ? 4 : 6), CardRegular::SIG_MARGIN + ($removeAvatarMargin ? 4 : 6), $removeAvatarMargin ? 80 : 76, $removeAvatarMargin ? 80 : 76);
     $rank = new ComponentLabel($signature, $isCountryRank ? 325 : 287, 32, '#' . number_format($userRank) . ($isCountryRank ? " (" . '#' . number_format($userCountryRank) . ')' : ""), ComponentLabel::FONT_REGULAR, $headerTextColour, $isCountryRank ? 12 : 14, \Imagick::ALIGN_RIGHT, 0);
     $mode = new ComponentLabel($signature, $isCountryRank ? 313 : 290, $isCountryRank ? 18 : 31, json_decode('"\\ue00' . $iconmode . '"'), ComponentLabel::FONT_OSU, $headerTextColour, $isCountryRank ? 12 : 14, \Imagick::ALIGN_LEFT, $isCountryRank ? 12 : 14);
     $flag = new ComponentFlag($signature, $isCountryRank ? 294 : 307, $isCountryRank ? 10 : 21, $isCountryRank ? 13 : 18, $isCountryRank ? 9 : 12);
     $nameFontSize = 24;
     $nameFont = ComponentLabel::FONT_DIRECTORY . ComponentLabel::FONT_MEDIUM;
     $nameDimensions = imagettfbbox(static::getGDFontSize($nameFontSize), 0, $nameFont, $username);
     $nameTextWidth = abs($nameDimensions[4] - $nameDimensions[0]);
     while ($nameTextWidth > ($isCountryRank ? 235 : 198) - $rank->getActualWidth()) {
         $nameDimensions = imagettfbbox(static::getGDFontSize($nameFontSize), 0, $nameFont, $username);
         $nameTextWidth = abs($nameDimensions[4] - $nameDimensions[0]);
         $nameFontSize -= 0.5;
     }
     $name = new ComponentLabel($signature, 90, 32, $username, ComponentLabel::FONT_MEDIUM, $headerTextColour, $nameFontSize, \Imagick::ALIGN_LEFT, -2);
     $accuracyLabel = new ComponentLabel($signature, 91, 56, "Accuracy", ComponentLabel::FONT_REGULAR, '#555555', 14, \Imagick::ALIGN_LEFT);
     $playCountLabel = new ComponentLabel($signature, 91, 73, $showRankedScore ? "Ranked Score" : "Play Count", ComponentLabel::FONT_REGULAR, '#555555', 14, \Imagick::ALIGN_LEFT);
     $accuracyText = round($accuracy, 2) . '%' . ($showPP && $pp == 1 ? ' (' . number_format(floor($ppText)) . 'pp)' : '');
     $accuracyValueLabel = new ComponentLabel($signature, 325, 56, $accuracyText, ComponentLabel::FONT_BOLD, '#555555', 14, \Imagick::ALIGN_RIGHT, -2);
     $playCountText = number_format($playcount) . ($showPP && $pp == 0 ? ' (' . number_format(floor($ppText)) . 'pp)' : ($showXPBar ? '' : ' (lv' . floor($level) . ')'));
     $playCountValueLabel = new ComponentLabel($signature, 325, 73, $showRankedScore ? Utils::largeNumberFormat($user['ranked_score']) : $playCountText, ComponentLabel::FONT_BOLD, '#555555', 14, \Imagick::ALIGN_RIGHT, -2);
     $this->addComponent($avatar);
     $this->addComponent($rank);
     $this->addComponent($mode);
     $this->addComponent($flag);
     $this->addComponent($name);
     $this->addComponent($accuracyLabel);
     $this->addComponent($playCountLabel);
     $this->addComponent($accuracyValueLabel);
     $this->addComponent($playCountValueLabel);
     if ($showPP && $pp == 2) {
         $ppLabel = new ComponentLabel($signature, $isCountryRank ? 290 : 326, 18, number_format(floor($ppText)) . 'pp', ComponentLabel::FONT_REGULAR, $headerTextColour, 10, \Imagick::ALIGN_RIGHT, -2);
         $this->addComponent($ppLabel);
     }
     $onlineIndicator = isset($_GET['onlineindicator']) ? $_GET['onlineindicator'] : false;
     $online = $onlineIndicator == 2 || $onlineIndicator == 3 ? Utils::isUserOnline($user['username']) : false;
     if ($online) {
         $onlineIndicatorImage = new ComponentImage($signature, $avatar->x + $avatar->getWidth() - 17, $avatar->y + $avatar->getHeight() - 17, ComponentImage::IMG_DIRECTORY . 'online_indicator.png');
         $this->addComponent($onlineIndicatorImage);
     }
     if ($showXPBar) {
         $xpBar = new ComponentXPBar($signature, 92, 79, isset($_GET['xpbarhex']) ? '' : '#ffa200', 233, 4);
         $this->addComponent($xpBar);
     }
     // I don't know either.
     $this->extraWidth = CardRegular::SIG_MARGIN * 2 + 1;
     $this->extraHeight = $removeAvatarMargin ? 1 : 3;
 }
Example #29
0
 public function __construct($_parameters)
 {
     parent::__construct($_parameters);
     $this->tags["title"] = "JATE - Home";
     $this->tags["content"] = $this->makePage();
 }
Example #30
0
 /**
     Expects a filename to the simple config.
     @param string $file Path to file.
     @return object.
     **/
 function __construct($file)
 {
     $result = TemplateParser::parseSimpleTemplate($file);
     parent::__construct($file, $result[0], $result[1]);
 }