function init($mySql, $queries, $lang, $module, $module_dispatch, $idUrl, $categorie, $ss_categorie, $search, $sort, $order, $page) { $HelperOther = new HelperOther(); $Updates = new Updates(); $Action = new Action(); $entry = $mySql->fetch_row($queries->selectById($mySql, $module_dispatch, $idUrl)); $getColumn = $queries->selectAll($mySql, $module_dispatch); $layout = $Updates->debut($lang, $module, $module_dispatch, $idUrl, $categorie, $ss_categorie, $search, $sort, $order, $page); for ($i = 0; $i < $mySql->num_fields($getColumn); $i++) { // Boucle sur les colonnes $column = $mySql->fetch_field($getColumn); $column = $column->name; $update = $entry[$i]; if ($Action->exclusion($module, $column)) { $field = $HelperOther->findField($column); @(!(include_once 'controller/fields/' . $field . '.class.php')); if (class_exists($field)) { $getValue = new $field($lang, $module_dispatch, $update, $column, UPDATE); $update = $getValue->update; $layout .= $Updates->update($update); } } } $layout .= $Updates->fin($lang, $module_dispatch); return $layout; }
function init($module, $lang, $idURL, $categorie, $sscategorie, $type, $sort, $order, $page, $search) { $entry = Db::fetch_row(Query::selectById($idURL)); $getColumn = Query::selectAll(); $output = Updates::debut($module, $lang, $categorie, $sscategorie, $sort, $order, $page, $idURL, $search); for ($i = 0; $i < Db::num_fields($getColumn); $i++) { // Boucle sur les colonnes $column = Db::fetch_field($getColumn); $column = $column->name; $update = $entry[$i]; $field = Utils::findField($column); @(!(include_once 'controller/fields/' . $field . '.class.php')); if (class_exists($field)) { if ($field == "date") { $update = Utils::dateFr($update); } $getValue = new $field($lang, $update, $column, $type); $update = $getValue->update; if ($this->exclusion($sscategorie, $column)) { $output .= Updates::update($update); } } } $output .= Updates::fin($module, $lang); return $output; }
function get_content() { include_once 'classes/Dashboard.php'; $updates0 = Updates::get_updates(0); $updates1 = Updates::get_updates(1); foreach ($updates0 as $id => $value) { $updates[$id] = $value; } foreach ($updates1 as $id => $value) { $updates[$id] = $value; } $index = 1; $updateStr = ''; $updateStr .= "<ul>"; foreach ($updates as $id => $action) { $curUpdate = new Updates($id); if ($index < 10) { $updateStr .= '<li>' . $curUpdate->get_date() . ' by ' . $curUpdate->get_username() . ' - ' . $curUpdate->get_action() . '</li>'; } else { $updateStr .= "<li class=\"hidden\">" . $curUpdate->get_date() . " by " . $curUpdate->get_username() . " - " . $curUpdate->get_action() . "</li>"; } if ($index == 9) { $updateStr .= "<li style='float:right; list-style:none;'><input type='checkbox' id='showArchived'>Show archived updates</input></li><hr>"; } $index++; } $updateStr .= "</ul>"; return $updateStr; }
function get($request) { $response = new Response($request); $data = Updates::getVersionStats(30); $this->tm->smarty->assign('title', 'Statistics'); $this->tm->smarty->assign('output', $data); $response->code = Response::OK; $response->addHeader('Content-type', 'text/html'); $response->body = $this->tm->render('stats'); return $response; }
protected function _prepareCollection() { require_once getcwd() . '/app/code/local/PagSeguro/PagSeguro/Model/Updates.php'; $collection = Mage::getResourceModel($this->_getCollectionClass()); Updates::createTableModule($collection); //$collection->getSelect()->joinLeft( // 'pagseguro_sales_code', // 'main_table.entity_id = pagseguro_sales_code.order_id', // array('transaction_code') //); //$collection->printlogquery(true);exit; $this->setCollection($collection); return parent::_prepareCollection(); }
function addLocation($location) { //global the variables global $deviceKey, $deviceForm, $tool, $headings, $titles, $status; //create an empty temporary array to store all the new values given from the form $tempDeviceInfo = array(); $deviceKey = array("name", "city", "address", "postal", "phone", "email", "room" . "notes", "addLocation"); //add the values from the array foreach ($deviceKey as $index => $key) { $tempDeviceInfo[$key] = addslashes(htmlspecialchars(trim($_POST[$key]), ENT_QUOTES)); } //set the values for location if ($location->set_name($tempDeviceInfo[name])) { $location->set_city($tempDeviceInfo[city]); $location->set_address($tempDeviceInfo[address]); $location->set_postal_code($tempDeviceInfo[postal]); $location->set_email($tempDeviceInfo[email]); $location->set_phone($tempDeviceInfo[phone]); $location->set_room($tempDeviceInfo[room]); $location->set_notes($tempDeviceInfo[notes]); //if the insert is sucessful reload the page with the new values if ($this_ID = $location->insert()) { $status = "success"; $allLocation = Location::get_locations(); $_SESSION['action'] = "Added new device location: " . $tempDeviceInfo[name]; $update = new Updates(); $update->set_action($_SESSION['action']); $update->set_username($_SESSION['fullname']); if ($update->insert_update()) { $_SESSION['action'] = ""; } foreach ($allLocation as $id => $type) { echo "<option id={$id} name={$id}>{$type}</option>"; } } else { $deviceForm->error("Warning: Failed to add location. Reason: " . $location->get_error(), $_GET['ID']); } } else { $deviceForm->error("Warning: Failed to add location. Reason: " . $location->get_error(), $_GET['ID']); } }
public static function getUpdates($version, $build) { $db = Database::obtain(); // erhöhe die Version Statistik für den Build Updates::updateVersionStats($build); $sql = "SELECT * FROM `" . TABLE_VERSIONS . "` WHERE `build`>'" . $build . "' ORDER BY `build` DESC"; $version_array = array(); $version_array['changes'] = array(); $rows = $db->fetch_array($sql); if (empty($rows)) { $message = array(); $message['message'] = "no updates"; return (object) $message; } else { $version_array['version'] = $rows[0]['version']; $version_array['build'] = $rows[0]['build']; $version_array['update'] = "http://gctour.madd.in/download/gctour.user.js"; foreach ($rows as $record) { $version = array(); $version['version'] = $record['version']; $version['build'] = $record['build']; $version['changes'] = preg_split("/(\r?\n)/", $record['bugfixes']); $version_array['changes'][] = (object) $version; } return (object) $version_array; } }
} $access = $_SESSION['access']; if (preg_match("/configurations.php/", $_SERVER['PHP_SELF'])) { if ($access != 100) { header("Location: index.php"); echo "<h1>You have no permission</h1>"; } } if ($_SESSION['action'] != "") { $allUpdates = Updates::get_updates(); $index = 0; foreach ($allUpdates as $id => $value) { $index++; if ($index > 10) { $curUpdate = new Updates($id); if ($curUpdate->get_archived() == 0) { $curUpdate->set_archived(1); if (!$curUpdate->update()) { echo 'update widget failed. Reason: ' . $curUpdate->get_error(); } } } } $update = new Updates(); $update->set_action($_SESSION['action']); $update->set_username($_SESSION['fullname']); $update->set_archived(0); if ($update->insert_update()) { $_SESSION['action'] = ""; } }
protected function createComponentDownload() { $updates = new Updates($this->context->gameUpdateModel, $this->path); $updates->setForImmediateUse($this->serverRepo, $this->newServerId, "Create:summary"); return $updates; }
<?php /** * Created by Kent M. Patrick * Project: BPU * Company: Fingerprints Ltd * Date: 21/09/2016 * Time: 9:58 AM */ require_once 'header.php'; $update = new Updates(); $report = new Report(); $html->title("Website Updates", '', "left"); echo "<div class='row'>"; echo "<div class='col-xs-12 col-sm-6'>"; if (isset($_GET['install'])) { touch('update.lock'); $release = str_replace("v", '', $_GET['install']); $dir = "includes/releases/BPU-{$release}/dist"; copy("{$dir}/install.php", "install.php"); unlink("{$dir}/install.php"); if (file_exists("{$dir}/config.php")) { unlink("{$dir}/config.php"); } $html->redirection("install.php?release=" . $_GET['install']); } else { $update->display_info(); } echo "</div>"; echo "<div class='col-xs-12 col-sm-6'>"; if (isset($_GET['download'])) {
/** * \brief Запускаем виджет * \details Обращаемся к базе и смотрим есть ли строки с сегодняшней датой (отметка на 12:00) */ public function run() { $updates = Updates::model()->findByAttributes(array('DATE' => date('d.m.Y', mktime(12, 0, 0, date('m'), date('d'), date('Y')))), array('order' => 'UPDATE_ID DESC')); $this->status = $updates['STATUS']; }
<?php /** * Created by Kent M. Patrick * Project: BPU * Company: Fingerprints Ltd * Date: 21/09/2016 * Time: 9:58 AM */ require_once 'header.php'; $update = new Updates(); $update->getLatestRelease(); if (!$update->differ()) { $alerts->display("info", "Update Pending", "There is a new update, please update or contact an Administrator"); } $html->title("BPU Wiki", "instructions on how to use the bpu", "left"); $table = new Tables(); $wiki = new Wiki(); echo "<div class='row'>"; echo "<div class='col-xs-12 col-sm-6'>"; echo "<div class='list-group'>"; echo "<h4 class='text-capitalize'>table of contents</h4>"; echo "<a href='#introduction' class='list-group-item'>Introduction</a>"; echo "<a href='#collections' class='list-group-item'>Collections</a>"; echo "<a href='#steps' class='list-group-item'>Steps</a>"; echo "<a href='#image_preview' class='list-group-item'>Image Preview</a>"; echo "<a href='#products' class='list-group-item'>Products</a>"; if ($_SESSION['settings']['filenames']) { echo "<a href='#filenames' class='list-group-item'>Filenames</a>"; } if ($_SESSION['role_id'] < 3) {
/** * Handle a POST request for the update * @param Request request * @return Response */ function post($request) { $response = new Response($request); /* { "build" : 11313, "changes" : [ { "build" : 11313, "changes" : [ "FIXED: GPX Download bug \"...ctl00_hlSignOut... is undefined\"", "FIXED: Issue 18", "FIXED: bug after gc.com update", "NEW: Update added link in the error-Dialog", "NEW: User can write a message in the error-Dialog" ], "version" : 2.1000000000000001 }, { "build" : 11293, "changes" : [ "FIXED: <=3 Logs in printout -> \"Last4Logs\" (L4L) in the printout", "FIXED: Logs in GPX (Unicode hexadez.)", "UPDATED: dutch translation", "Add jQuery (1.6.4) and jQuery-ui (1.8.16)" ], "version" : 2.1000000000000001 }, { "build" : 11285, "changes" : [ "FIXED: autoTour", "FIXED: GCTour on the search page", "FIXED: Logs in printout", "FIXED: Logs in GPX", "UPDATED: french translation", "GPX: New Groundspeak implementation to prevent XML errors", "NEW: Titlepage in the printview now contains coordinates and basic informations", "NEW: printview contains now the PM cache note!", "NEW: delete button for current tour", "NEW: 'Last4Logs' (L4L) has been added to the printout - similar to http://www.gsak.net/help/hs11980.htm" ], "version" : 2.1000000000000001 } ], "script" : "gctour", "update" : "http://userscripts.org/scripts/source/36273.user.js", "version" : 2.1000000000000001 } { "build" : "11313", "changes" : [ { "build" : "11313", "changes" : [ "eine test Zeile", "noch eine Zeile", "und noch ein super FIX!!" ], "version" : "2.1" }, { "build" : "11311", "changes" : [ "Version 2.1.11311 Changes", "haben viel getan", "und auch nichts geändert!" ], "version" : "2.1" }, { "build" : "11310", "changes" : [ "chnages 2.0", "naja - ein wenig sonderzeichen", "()" ], "version" : "2.0" } ], "version" : "2.1" } */ if (isset($_POST['update'])) { // Remove those slashes if (get_magic_quotes_gpc()) { $upd = stripslashes($_POST['update']); } else { $upd = $_POST['update']; } $update_obj = json_decode($upd); $updates = Updates::getUpdates($update_obj->{'version'}, $update_obj->{'build'}); $response->code = Response::OK; $response->addHeader('Content-type', 'text/plain'); $response->body = json_encode($updates); } else { $response->code = Response::BADREQUEST; } return $response; }
private function _validator() { require_once getcwd() . '/app/code/local/PagSeguro/PagSeguro/Model/Updates.php'; Updates::createTableModule(); }