private function parseResult(Game $game, Htmldom $html) { $score1Row = $html->find('table.match-day td.score span.score b.score-h', 0); $score2Row = $html->find('table.match-day td.score span.score b.score-a', 0); if ($score1Row != null && $score2Row != null) { $data = ['score1' => parseInt($score1Row->innertext), 'score2' => parseInt($score2Row->innertext)]; $validator = Validator::make($data, ['score1' => 'required|integer', 'score2' => 'required|integer']); if (!$validator->fails()) { (new GameRepository())->saveScore($game, $data); return true; } } return false; }
function parseDateInt($dateInt) { $dateInt = (string) $dateInt; if ($dateInt[0] == "0" && strlen($dateInt) != 1) { $dateInt = $dateInt[1]; } if (isNaN(parseInt($dateInt))) { return "0"; } if (strlen($dateInt) == 1) { $dateInt = "0" . $dateInt; } return $dateInt; }
<?php /* config.js */ $params->PageBgColor = $params->PageBgColor ? $params->PageBgColor : "#d7d7d7"; $slideshow_css = '$CssPath$style.css'; $thumbs = (object) array('margin' => 3, 'padding' => 3); $params->Border = parseInt($params->noFrame) ? "none" : "1px solid rgba(255, 255, 255, 0.4)"; array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bullet.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/arrows.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/play.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/pause.png')); if ($params->ShowTooltips) { $params->ThumbWidthHalf = round($params->ThumbWidth / 2); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/triangle-' . $params->TooltipPos . '.png', 'dest' => '$ImgPath$triangle.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-tooltip.css', 'dest' => $slideshow_css, 'filters' => array('params'))); } // call this function at the end of each template finalize();
static function getValidationMessage($validation) { $type = $validation['type']; $param = ''; if (isset($validation['param'])) { $param = $validation['param']; } switch ($type) { case 'min': return t('Value must be higher than %s.', $param); break; case 'length': if (parseInt($param) > 1) { return t('Value must be at least %s characters long.', $param); } else { return t('This field cannot be empty.'); } break; case 'maxlen': return t('Maximum length is %s characters.', $param); break; case 'email': return t('Please enter valid e-mail address.'); break; case 'date': return t('Please enter valid date.'); break; case 'ip': return t('Please enter valid IP address.'); break; case 'integer': return t('Please enter whole number.'); break; case 'decimal': case 'price': return t('Please enter valid decimal number.'); break; default: return t('Required.'); } }
$tree->register(); $tree = new Tree\NestedTree\NestedTree(prefix_table("nested_tree"), 'id', 'parent_id', 'title'); //Load AES $aes = new SplClassLoader('Encryption\\Crypt', '../includes/libraries'); $aes->register(); // CASE where title is changed if (isset($_POST['newtitle'])) { $id = explode('_', $_POST['id']); //update DB DB::update(prefix_table("nested_tree"), array('title' => mysqli_escape_string($link, stripslashes($_POST['newtitle']))), "id=%i", $id[1]); //Show value echo $_POST['newtitle']; // CASE where RENEWAL PERIOD is changed } elseif (isset($_POST['renewal_period']) && !isset($_POST['type'])) { //Check if renewal period is an integer if (parseInt(intval($_POST['renewal_period']))) { $id = explode('_', $_POST['id']); //update DB DB::update(prefix_table("nested_tree"), array('renewal_period' => mysqli_escape_string($link, stripslashes($_POST['renewal_period']))), "id=%i", $id[1]); //Show value echo $_POST['renewal_period']; } else { //Show ERROR echo $LANG['error_renawal_period_not_integer']; } // CASE where the parent is changed } elseif (isset($_POST['newparent_id'])) { $id = explode('_', $_POST['id']); //Store in DB DB::update(prefix_table("nested_tree"), array('parent_id' => $_POST['newparent_id']), "id=%i", $id[1]); //Get the title to display it
<?php /* config.js */ $params->PageBgColor = $params->PageBgColor ? $params->PageBgColor : "#d7d7d7"; $slideshow_css = '$CssPath$style.css'; $thumbs = (object) array('margin' => 3, 'padding' => 2); $params->Border = parseInt($params->noFrame) ? "none" : "6px solid #E9E9E9"; array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bullet.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/arrows.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/play.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/pause.png')); if ($params->ShowTooltips) { $params->ThumbWidthHalf = round($params->ThumbWidth / 2); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/triangle-' . $params->TooltipPos . '.png', 'dest' => '$ImgPath$triangle.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-tooltip.css', 'dest' => $slideshow_css, 'filters' => array('params'))); } // call this function at the end of each template finalize();
<?php require_once $home_dir . 'models/category.m.php'; require_once $home_dir . 'models/alias.m.php'; require_once $home_dir . 'classes/forms.php'; $form = new AdminForm('category'); $page = 'admin/form'; $form->add([['name' => 'category_name', 'label' => 'Name', 'type' => 'text'], ['name' => 'alias_url', 'label' => 'Alias', 'type' => 'text'], ['name' => 'category_parent_id', 'label' => 'Parent Category', 'type' => 'select', 'select_table' => 'categories', 'select_id_field' => 'category_id', 'select_label_field' => 'category_name']]); if (isset($_POST['category_id'])) { $category = new Category($db, $_POST['category_id']); $category->setData($form->processInput($_POST)); $category->data['category_parent_id'] = parseInt($category->val('category_parent_id')); $alias_url = $category->val('alias_url'); unset($category->data['alias_url']); $category->save(); $alias = new Alias($db, $category->ival('category_alias_id')); // save alias if new or changed if ($alias->val('alias_url') != $alias_url || !$alias->is_loaded) { $alias->data['alias_path'] = $category->getAliasPath(); if (isset($alias_url) && strlen(trim($alias_url)) > 0) { $alias->setUrl($alias_url); } else { $alias->setUrl($category->getAliasUrl()); } $alias->save(); } // update category alias if changed if ($alias->ival('alias_id') != $category->ival('category_alias_id')) { $category->data['category_alias_id'] = $alias->ival('alias_id'); $category->save(); }
<?php // ContenidoLogica $cont = null; // String $tipocont = null; try { // String $id_cont = request . getParameter("id"); // int $id = 0; try { $id = Integer . parseInt($id_cont); } catch (NumberFormatException $ex) { } $cont = ContenidoLogica . Buscar(id); $tipocont = cont . getTipo() . toString() . toLowerCase(); } catch (NullPointerException $e) { } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Ver Capitulo</title> <!-- <link rel='stylesheet' type='text/css' href="../Scripts/stylesWeb2.css"> --> <link rel='stylesheet' type='text/css' href="../Scripts/jquery-ui.min.css"> <script type="text/javascript" src="../Scripts/jquery-2.0.0.min.js" ></script> <script type="text/javascript" src="../Scripts/jquery.validate.min.js" ></script> <script type="text/javascript" src="../Scripts/jquery-ui.min.js" ></script> <script type="text/javascript" src="../Scripts/ajaxRequestScript.js" ></script> <script type="text/javascript" src="../Scripts/ContenidoBindings.js"></script>
function editCertificateUserRecord($recid, $certid, $serial, $version, $issue, $expire, $filename) { $result = false; $record = get_record('certificate_records', 'id', $recid); $record->certificateid = parseInt($certid); $record->serial_number = addslashes($serial); $record->version_code = addslashes($version); $record->issue_date = $issue; $record->expire_date = $expire; if (!empty($filename)) { if (!empty($record->filename)) { if (fileDelete("", $record->filename)) { //echo "File deleted. - ".$record->filename; $filechanged = true; } else { //echo "Cannot delete file. - ".$record->filename; $filechanged = false; } } else { $filechanged = true; } } //echo "File: ".$record->filename." -> ".$filename."<br/>"; //if($filechanged){ if (!file_exists($record->filename) && file_exists($filename)) { $record->filename = $filename; } $recordid = update_record('certificate_records', $record); if ($recordid > 0) { $result = true; } return $result; //$sql_str = "INSERT INTO mdl_certificate_records (title,description) VALUES('$title','$desc')"; //echo $sql_str; //return execute_sql($sql_str); }
function _gi($name, $def = null) { return parseInt(_g($name, $def)); }
<?php /* config.js */ $params->PageBgColor = $params->PageBgColor ? $params->PageBgColor : "#d7d7d7"; $slideshow_css = '$CssPath$style.css'; $thumbs = (object) array('margin' => 3, 'padding' => 4); $params->Border = parseInt($params->noFrame) ? "none" : "4px solid #F71277"; array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bullet.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/arrows.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/play.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/pause.png')); if ($params->ShowTooltips) { $params->ThumbWidthHalf = round($params->ThumbWidth / 2); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/triangle-' . $params->TooltipPos . '.png', 'dest' => '$ImgPath$triangle.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-tooltip.css', 'dest' => $slideshow_css, 'filters' => array('params'))); } // call this function at the end of each template finalize();
<?php /* config.js */ $params->PageBgColor = $params->PageBgColor ? $params->PageBgColor : "#d7d7d7"; $slideshow_css = '$CssPath$style.css'; $thumbs = (object) array('margin' => 3, 'padding' => 4); $params->Border = parseInt($params->noFrame) ? "none" : "5px dotted #DD4322"; array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bullet.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/arrows.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/play.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/pause.png')); if ($params->ShowTooltips) { $params->ThumbWidthHalf = round($params->ThumbWidth / 2); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/triangle-' . $params->TooltipPos . '.png', 'dest' => '$ImgPath$triangle.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-tooltip.css', 'dest' => $slideshow_css, 'filters' => array('params'))); } // call this function at the end of each template finalize();
<?php /* config.js */ $params->PageBgColor = $params->PageBgColor ? $params->PageBgColor : "#d7d7d7"; $slideshow_css = '$CssPath$style.css'; $thumbs = (object) array('margin' => 3, 'padding' => 4); $params->Border = parseInt($params->noFrame) ? "none" : "4px solid #0cad00"; array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bullet.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/arrows.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/play.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/pause.png')); if ($params->ShowTooltips) { $params->ThumbWidthHalf = round($params->ThumbWidth / 2); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/triangle-' . $params->TooltipPos . '.png', 'dest' => '$ImgPath$triangle.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-tooltip.css', 'dest' => $slideshow_css, 'filters' => array('params'))); } // call this function at the end of each template finalize();
<?php /* config.js */ $params->PageBgColor = $params->PageBgColor ? $params->PageBgColor : "#d7d7d7"; $slideshow_css = '$CssPath$style.css'; $thumbs = (object) array('margin' => 3, 'padding' => 2); $params->Border = parseInt($params->noFrame) ? "none" : "2px solid #26B1AA"; array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bullet.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/arrows.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/play.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/pause.png')); if ($params->ShowTooltips) { $params->ThumbWidthHalf = round($params->ThumbWidth / 2); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/triangle-' . $params->TooltipPos . '.png', 'dest' => '$ImgPath$triangle.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-tooltip.css', 'dest' => $slideshow_css, 'filters' => array('params'))); } // call this function at the end of each template finalize();
<?php /* config.js */ $params->PageBgColor = $params->PageBgColor ? $params->PageBgColor : "#d7d7d7"; $thumbs = (object) array('margin' => 3, 'padding' => 1); $slideshow_css = '$CssPath$style.css'; $params->Border = "none"; $params->BoxShadow = parseInt($params->noFrame) ? "none" : "0 0 10px #000000"; array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bullet.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/arrows.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/play.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/pause.png')); if ($params->ShowTooltips) { $params->ThumbWidthHalf = round($params->ThumbWidth / 2); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/triangle-' . $params->TooltipPos . '.png', 'dest' => '$ImgPath$triangle.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-tooltip.css', 'dest' => $slideshow_css, 'filters' => array('params'))); } // call this function at the end of each template finalize();
private function setName($name) { $this->name = $name; $this->number = parseInt($this->name, 10); $this->calculateHexagonXY(); }
<?php /* config.js */ $params->PageBgColor = $params->PageBgColor ? $params->PageBgColor : "#d7d7d7"; $slideshow_css = '$CssPath$style.css'; $thumbs = (object) array('margin' => 3, 'padding' => 4); $params->Border = parseInt($params->noFrame) ? "none" : "5px solid #ACB7BD"; array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bullet.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/arrows.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/play.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/pause.png')); if ($params->ShowTooltips) { $params->ThumbWidthHalf = round($params->ThumbWidth / 2); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/triangle-' . $params->TooltipPos . '.png', 'dest' => '$ImgPath$triangle.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-tooltip.css', 'dest' => $slideshow_css, 'filters' => array('params'))); } // call this function at the end of each template finalize();
if ($data['sphData']) { $sphArray = parsePowerData($data['sphData']); $arr['maxplus'] = max($sphArray); $arr['maxminus'] = min($sphArray); } if ($data['cylPwrData']) { $cylArray = parsePowerData($data['cylPwrData']); //remember - the cyl values will be minus powers! $arr['maxcylpower'] = min($cylArray); } if ($data['cylAxisData']) { $string = $data['cylAxisData']; $increment = 90; if (preg_match_all("/[0-9]*\\s*steps/", $data['cylAxisData'], $matches)) { foreach ($matches[0] as $steps) { $int = parseInt($steps); if ($int < $increment) { $increment = $int; } } } $arr['cylaxissteps'] = $increment; $dataArray = parseIntegerData($data['cylAxisData']); $arr['oblique'] = mostObliqueAxis($dataArray); } if ($data['addData']) { $addArray = parsePowerData($data['addData']); $arr['maxadd'] = max($addArray); //if (! is_numeric($arr['maxadd']) ) $arr['maxadd'] = null; } if (count($arr) > 0) {
function __construct($pObject) { $this->obj = $pObject; $this->tag = $GLOBALS['controlType'][$this->obj->ControlType]; $this->font_weight = $this->obj->FontWeight; $this->font_family = $this->obj->FontName; $alignment = array('left', 'left', 'center', 'right'); $this->text_align = $alignment[$this->obj->TextAlign]; if ($this->text_align == '') { $this->text_align = $this->obj->TextAlign; } $this->value = $this->obj->Value; if ($this->tag == 'Label') { $this->value = $this->obj->Caption; } if ($this->tag == 'Field') { $this->value = $this->obj->ControlSource; } if ($this->tag == 'Graph') { $this->obj->BackColor = 'black'; } if ($this->tag == 'Graph') { $this->obj->ForeColor = 'white'; } if ($this->tag == 'Graph') { $this->obj->FontSize = '10px'; } if ($this->tag == 'PageBreak') { $this->obj->BorderColor = 'black'; } if ($this->tag == 'PageBreak') { $this->obj->borderWidth = '4px'; } if ($this->tag == 'PageBreak') { $this->obj->height = 4 * resize() . "px"; } //Nick 21/07/09 added ."px" if ($this->tag == 'PageBreak') { $this->obj->width = 44 * resize() . "px"; } //Nick 21/07/09 added ."px" if ($this->tag == 'PageBreak') { $this->obj->left = 0 * resize() . "px"; } //Nick 21/07/09 added ."px" $this->name = $this->obj->Name; if (isNB()) { //-- is nuBuilder if ($this->tag == 'Graph') { $this->value = $this->obj->Value; } if ($this->tag == 'Graph') { $this->graph = $this->obj->Graph; } $this->font_size = parseInt($this->obj->FontSize) . "px"; //Nick 21/07/09 wrapped in parseInt()."px" $this->top = parseInt($this->obj->Top) . "px"; //Nick 21/07/09 wrapped in parseInt()."px" $this->left = parseInt($this->obj->Left) . "px"; //Nick 21/07/09 wrapped in parseInt()."px" $this->width = parseInt($this->obj->Width) . "px"; //Nick 21/07/09 wrapped in parseInt()."px" $this->height = parseInt($this->obj->Height) . "px"; //Nick 21/07/09 wrapped in parseInt()."px" } else { if ($this->tag == 'Graph') { $this->value = $this->obj->Tag; } if ($this->tag == 'Graph') { $this->graph = $this->obj->Name; } if ($this->font_family == 'Arial') { $this->font_size = floor(parseInt($this->obj->FontSize) * 1.3) . "px"; //Nick 21/07/09 added ."px" } else { $this->font_size = floor(parseInt($this->obj->FontSize) * 1.5) . "px"; //Nick 21/07/09 added ."px" } $this->top = parseInt($this->obj->Top * resize()) . "px"; //Nick 21/07/09 wrapped in parseInt()."px" $this->left = parseInt($this->obj->Left * resize()) . "px"; //Nick 21/07/09 wrapped in parseInt()."px" $this->width = parseInt($this->obj->Width * resize()) . "px"; //Nick 21/07/09 wrapped in parseInt()."px" $this->height = parseInt($this->obj->Height * resize()) . "px"; //Nick 21/07/09 wrapped in parseInt()."px" } $this->color = $this->obj->ForeColor; $this->back_ground_color = $this->obj->BackColor; $this->border_width = parseInt($this->obj->BorderWidth) . "px"; //Nick 21/07/09 wrapped in parseInt()."px" $this->border_color = $this->obj->BorderColor; $this->border_style = $this->obj->BorderStyle; $this->can_grow = $this->obj->CanGrow; $textFormat = textFormatsArray(); $this->format = $this->obj->Format; $this->HTML = $this->buildHTML(); }
/** * Instruction to add after query::update or query::insert * Set a value to a field * * @access public * @param mixed $field name of the field * @param String $value[optional] value of the field - default: '' * @return query $this pour assurer la chaînabilité de la classe */ public function set($field = '', $value = '') { // Vérification de l'argument FIELD indispensable if (empty($field)) { debug::error("SQL", "FIELD argument must be valid in SET method.", __FILE__, __LINE__); $this->error = true; } // La méthode set ne peut être appelée après la méthode SELECT if ($this->content['select']) { debug::error("SQL", "SET method can't be requested with the SELECT method.", __FILE__, __LINE__); $this->error = true; } // Si le paramètre entré en est un array associatif, on met en place un multiple-set if (is_array($field)) { foreach ($field as $key => $value) { $this->set($key, $value); } return $this; } if ($this->content['update']) { if ($this->content['set']) { $this->prepare_request .= ', '; } else { $this->prepare_request .= ' SET'; } if (preg_match("#^\\+([0-9]{1,11})\$#", $value)) { $this->prepare_request .= ' ' . $this->table['set'] . '_' . $field . ' = ' . $this->table['set'] . '_' . $field . ' + ' . parseInt($value) . ''; } else { $this->prepare_request .= ' ' . $this->table['set'] . '_' . $field . ' = "' . addslashes($value) . '"'; } $this->content['set'] = true; } elseif ($this->content['insert']) { $this->fields[] = $this->table['set'] . '_' . $field; $this->values[] = addslashes($value); $this->content['set'] = true; } else { debug::error("SQL", "SET method can't be requested before UPDATE or a INSERT method.", __FILE__, __LINE__); $this->error = true; } return $this; }
public function append_into_db_msg() { extract($_POST); $UNIX_TIME = parseInt(strtotime(date("Y-m-d H:i:s"))); //+3600; $QUERY = "INSERT INTO chat values(NULL, {$id_user_writer} ,{$id_user_otherside} ,'{$msg}' , '" . $UNIX_TIME . "' ) "; mysql_query($QUERY, Conectar::con()); $id_last_msg = mysql_insert_id(); chat::get_msg_from_db_by_limit("justOneMSG", $id_user_writer); // obtenemos solo 1 msg notify::set_notify($id_last_msg); // metemos la notifycacion |||| pasamos ( user_writer , user_reader , id_chat); }
public function processForm($form) { global $path, $page_title, $messages; if (isset($_POST[$this->id_name])) { if ($form->processInput($_POST)) { if (parseInt($_POST[$this->id_name]) > 0) { $this->loadById($_POST[$this->id_name]); } $this->setData($form->processed_input); if ($this->save()) { if ($form->ret) { redirect($form->ret); } else { redirect('admin/' . $this->table_name); } } } else { $messages->error('Input does not validate.'); $this->setData($form->processed_input); } } elseif (isset($path[2]) && $path[2] == 'edit') { $this->loadById($path[3]); $page_title = t($form->entity_title) . ': ' . t('Editing'); } elseif (isset($path[2]) && $path[2] == 'delete') { if ($this->deleteById($path[3])) { if ($form->ret) { redirect($form->ret); } else { redirect('admin/' . $this->table_name); } } } else { $page_title = t($form->entity_title) . ': ' . t('New'); } }
function steamid64ToSteamid($id) { function parseInt($string) { // return intval($string); if (preg_match('/(\\d+)/', $string, $array)) { return $array[1]; } else { return 0; } } // Convert SteamID64 into SteamID $subid = substr($id, 4); $steamY = parseInt($subid); $steamY = $steamY - 1197960265728; $steamX = 0; if ($steamY % 2 == 1) { $steamX = 1; } else { $steamX = 0; } $steamY = ($steamY - $steamX) / 2; $steamID = "STEAM_0:" . (string) $steamX . ":" . (string) $steamY; return $steamID; }
<?php /* config.js */ $params->PageBgColor = $params->PageBgColor ? $params->PageBgColor : "#D3D3D3"; $slideshow_css = '$CssPath$style.css'; $thumbs = (object) array('margin' => 3, 'padding' => 4); $params->Border = parseInt($params->noFrame) ? "none" : "1px solid #FFFFFF"; array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bullet.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/arrows.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/play.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/pause.png')); if ($params->ShowTooltips) { $params->ThumbWidthHalf = round($params->ThumbWidth / 2); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/triangle-' . $params->TooltipPos . '.png', 'dest' => '$ImgPath$triangle.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-tooltip.css', 'dest' => $slideshow_css, 'filters' => array('params'))); } // call this function at the end of each template finalize();
<?php /* config.js */ $slideshow_css = '$CssPath$style.css'; $thumbs = (object) array('margin' => 3, 'padding' => 5); if (!parseInt($params->noFrame)) { // frame border+shadow $params->frameL = 0; $params->frameT = 100; $params->frameW = 100; $params->frameH = 20; // when thumbnails - fix shadow if ($params->Thumbnails && ($params->ThumbAlign == "top" || $params->ThumbAlign == "bottom")) { $thumbFullHeight = ($thumbs->margin + $thumbs->padding) * 2 + parseInt($params->ThumbHeight) + 15; // 15 is magic number :) $thumbFullHeightPercent = 100 * $thumbFullHeight / $imageH; $params->frameT -= $thumbFullHeightPercent; } array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/shadow.png', 'filters' => array('name' => 'resize', 'width' => $imageW, 'height' => $imageH * 0.2, 'margins' => border))); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-shadow.css', 'dest' => $slideshow_css, 'filters' => array('params'))); $params->BulletsBottom = -24; $params->backMarginsTop += $border->top; } else { $params->BulletsBottom = 5; } $params->decorW = $params->ImageWidth - 8 * 2; $params->decorH = $params->ImageHeight - 8 * 2; array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bullet.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/arrows.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/play.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/pause.png'));
<?php /* config.js */ $params->PageBgColor = $params->PageBgColor ? $params->PageBgColor : "#d7d7d7"; $slideshow_css = '$CssPath$style.css'; $thumbs = (object) array('margin' => 3, 'padding' => 4); if (!parseInt($params->noFrame)) { // frame border+shadow $border = (object) array('top' => 18, 'right' => 18, 'bottom' => 25, 'left' => 18); $ContaienerW = $imageW + $border->left + $border->right; $ContaienerH = $imageH + $border->top + $border->bottom; $params->frameL = round(100 * 100 * $border->left / $imageW) / 100; $params->frameT = round(100 * 100 * $border->top / $imageH) / 100; $params->frameW = floor(100 * 100 * ($imageW + $border->left + $border->right) / $imageW) / 100; $params->frameH = floor(100 * 100 * ($imageH + $border->top + $border->bottom) / $imageH) / 100; array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bg.png', 'filters' => array('name' => 'resize', 'width' => $ContaienerW, 'height' => $ContaienerH, 'margins' => $border))); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-frame.css', 'dest' => $slideshow_css, 'filters' => array('params'))); } array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bullet.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/arrows.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/play.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/pause.png')); if ($params->ShowTooltips) { $params->ThumbWidthHalf = round($params->ThumbWidth / 2); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/triangle-' . $params->TooltipPos . '.png', 'dest' => '$ImgPath$triangle.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-tooltip.css', 'dest' => $slideshow_css, 'filters' => array('params'))); } // call this function at the end of each template finalize();
<?php /* config.js */ $params->PageBgColor = $params->PageBgColor ? $params->PageBgColor : "#FFFFFF"; $slideshow_css = '$CssPath$style.css'; $thumbs = (object) array('margin' => 3, 'padding' => 4); $params->Border = parseInt($params->noFrame) ? "none" : "5px solid rgba(220, 220, 220, 0.6)"; array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/bullet.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/arrows.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/play.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/pause.png')); if ($params->ShowTooltips) { $params->ThumbWidthHalf = round($params->ThumbWidth / 2); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/triangle-' . $params->TooltipPos . '.png', 'dest' => '$ImgPath$triangle.png')); array_push($files, (object) array('src' => 'backgnd/' . $params->TemplateName . '/style-tooltip.css', 'dest' => $slideshow_css, 'filters' => array('params'))); } // call this function at the end of each template finalize();