public function execute($filterChain) { // context variables $context = $this->getContext(); $user = $context->getUser(); $request = $context->getRequest(); $uri = $request->getUri(); // Code to execute before the action execution // return $this->getContext()->getController()->forward('sfGuardAuth', 'updatesys'); //only run once per request $find = 'sfGuardAuth/updatesys'; // perform the search $position = strpos($uri, $find); // if ($position === false) // error_log("Not found"); // else // error_log("Match found at location $position"); if ($this->isFirstCall() && $position === false) { if (update::checkDbVersion() != "OK" && $user->isAuthenticated()) { //deauthenticate user and redirect him // $context->getUser()->signOut(); // $filterChain->execute(); return $context->getController()->redirect('sfGuardAuth/updatesys'); // return $context->getController()->forward('sfGuardAuth','updatesys'); } } // Execute next filter in the chain $filterChain->execute(); }
function displayMenu() { global $roster; if (defined('ROSTER_MENU_INC')) { // Create the mini update pop-up // Include update lib require_once ROSTER_LIB . 'update.lib.php'; $mini_update = new update(); // Fetch addon data $mini_update->fetchAddonData(); // Create the file fields $mini_update->makeFileFields('mini_file_fields'); unset($mini_update); //$roster->tpl->set_handle('roster_menu', 'menu.html'); //$roster->tpl->display('roster_menu'); } }
public function validateVersion() { global $wgOut; //$wgOut->addHtml('validating...'); $dbr = wfGetDB(DB_SLAVE); $update = new update(); $table = $this->dbPrefix . 'calendar_version'; $sql = "SELECT MAX(version) as ver FROM {$table};"; //make sure we have a version table... $dbr->ignoreErrors(true); $res = $dbr->query($sql); $dbr->ignoreErrors(true); if (!$res) { $update->validate("0"); //early beta crud wont have version table } else { $r = $dbr->fetchObject($res); if (version_compare($r->ver, mwcalendar_version, '<')) { $update->validate($r->ver); } } }
public function insert() { global $DB; global $website; $current_version = update::latest_installed(); $ok = $DB->execute(' INSERT INTO nv_backups (id, website, date_created, size, status, title, notes, file, runtime, version) VALUES ( 0, :website, :date_created, :size, :status, :title, :notes, :file, :runtime, :version) ', array('website' => $website->id, 'date_created' => time(), 'size' => value_or_default($this->size, 0), 'status' => value_or_default($this->status, ''), 'title' => value_or_default($this->title, ''), 'notes' => value_or_default($this->notes, ''), 'file' => value_or_default($this->file, ''), 'runtime' => value_or_default($this->runtime, 0), 'version' => $current_version->version . ' r' . $current_version->revision)); $this->id = $DB->get_last_id(); return true; }
/** * Updates status xml if necessary. */ public static function checkStatus() { require_once 'update/CCPDB/xml.parser.php'; $xml = new UpdateXMLParser(); if ($xml->getXML() < 3) { $xml->retrieveData(); update::$codeVersion = $xml->getLatestCodeVersion(); update::$dbVersion = $xml->getLatestDBVersion(); } return; }
$update = update::byId(init('id')); if (!is_object($update)) { $update = update::byLogicalId(init('id')); } if (!is_object($update)) { throw new Exception(__('Aucune correspondance pour l\'ID : ' . init('id'), __FILE__)); } $update->deleteObjet(); ajax::success(); } if (init('action') == 'updateAll') { update::makeUpdateLevel(init('mode'), init('level'), init('version', ''), init('onlyThisVersion', '')); ajax::success(); } if (init('action') == 'changeState') { $update = update::byId(init('id')); if (!is_object($update)) { throw new Exception(__('Aucune correspondance pour l\'ID : ' . init('id'), __FILE__)); } if (init('state') == '') { throw new Exception(__('Le status ne peut être vide', __FILE__)); } if (init('state') == 'hold') { $update->setStatus('hold'); $update->save(); } else { $update->checkUpdate(); } ajax::success(); } throw new Exception(__('Aucune methode correspondante à : ', __FILE__) . init('action'));
public static function install_from_file($version, $revision, $ufile, $ulog) { global $DB; // remove old update files (will be there if a previous update fails) file_put_contents($ulog, "remove old update folder\n", FILE_APPEND); core_remove_folder(NAVIGATE_PATH . '/updates/update'); // decompress file_put_contents($ulog, "create new folder\n", FILE_APPEND); mkdir(NAVIGATE_PATH . '/updates/update'); $zip = new ZipArchive(); file_put_contents($ulog, "open zip file\n", FILE_APPEND); if ($zip->open($ufile) === TRUE) { file_put_contents($ulog, "extract zip file\n", FILE_APPEND); $zip->extractTo(NAVIGATE_PATH . '/updates/update'); $zip->close(); } else { file_put_contents($ulog, "zip extraction failed\n", FILE_APPEND); @unlink($ufile); core_remove_folder(NAVIGATE_PATH . '/updates/update'); return false; } // chmod files (may fail, but not fatal error) file_put_contents($ulog, "chmod update (may fail in Windows)... ", FILE_APPEND); $chmod_status = core_chmodr(NAVIGATE_PATH . '/updates/update', 0755); file_put_contents($ulog, $chmod_status . "\n", FILE_APPEND); // do file changes file_put_contents($ulog, "parse file changes\n", FILE_APPEND); $hgchanges = file_get_contents(NAVIGATE_PATH . '/updates/update/changes.txt'); $hgchanges = explode("\n", $hgchanges); foreach ($hgchanges as $change) { file_put_contents($ulog, $change . "\n", FILE_APPEND); $change = trim($change); if (empty($change)) { continue; } $change = explode(" ", $change, 2); // new, removed and modified files // M = modified // A = added // R = removed // C = clean // ! = missing (deleted by non-hg command, but still tracked) // ? = not tracked // I = ignored // = origin of the previous file listed as A (added) $file = str_replace('\\', '/', $change[1]); //if(substr($file, 0, strlen('plugins/'))=='plugins/') continue; if (substr($file, 0, strlen('setup/')) == 'setup/') { continue; } switch ($change[0]) { case 'A': // added a new file // added a new file case 'M': // modified file if (!file_exists(NAVIGATE_PATH . '/updates/update/' . $file)) { file_put_contents($ulog, "file doesn't exist!\n", FILE_APPEND); return false; } @mkdir(dirname(NAVIGATE_PATH . '/' . $file), 0777, true); if (!@copy(NAVIGATE_PATH . '/updates/update/' . $file, NAVIGATE_PATH . '/' . $file)) { file_put_contents($ulog, "cannot copy file!\n", FILE_APPEND); return false; } break; case 'R': // remove file @unlink(NAVIGATE_PATH . '/' . $file); break; default: // all other cases // IGNORE the change, as we are now only getting the modified files } } // process SQL updates file_put_contents($ulog, "process sql update\n", FILE_APPEND); if (file_exists(NAVIGATE_PATH . '/updates/update/update.sql')) { $sql = file_get_contents(NAVIGATE_PATH . '/updates/update/update.sql'); // execute SQL in a transaction // http://php.net/manual/en/pdo.transactions.php try { // can't do it in one step => SQLSTATE[HY000]: General error: 2014 $sql = explode("\n\n", $sql); //file_put_contents($ulog, "begin transaction\n", FILE_APPEND); //$DB->beginTransaction(); foreach ($sql as $sqlline) { $sqlline = trim($sqlline); if (empty($sqlline)) { continue; } file_put_contents($ulog, "execute sql:\n" . $sqlline . "\n", FILE_APPEND); if (!$DB->execute($sqlline)) { file_put_contents($ulog, "execute failed: " . $DB->get_last_error() . "\n", FILE_APPEND); //throw new Exception($DB->get_last_error()); } // force commit changes (slower but safer... no --> SQLSTATE[HY000]: General error: 2014) $DB->disconnect(); $DB->connect(); } //file_put_contents($ulog, "commit transaction\n", FILE_APPEND); //$DB->commit(); } catch (Exception $e) { file_put_contents($ulog, "transaction error: \n" . $e->getMessage() . "\n", FILE_APPEND); //$DB->rollBack(); return false; } } else { file_put_contents($ulog, "no SQL found\n", FILE_APPEND); } // add the update row to know which navigate revision is currently installed file_put_contents($ulog, "insert new version row on updates\n", FILE_APPEND); $urow = new update(); $urow->id = 0; $urow->version = $version; $urow->revision = $revision; $urow->date_updated = time(); $urow->status = 'ok'; $urow->changelog = ''; try { $ok = $urow->insert(); } catch (Exception $e) { $error = $e->getMessage(); } if ($error) { file_put_contents($ulog, "execute insert failed:\n" . $DB->get_last_error() . "\n", FILE_APPEND); } if (file_exists(NAVIGATE_PATH . '/updates/update/update-post.php')) { include_once NAVIGATE_PATH . '/updates/update/update-post.php'; } file_put_contents($ulog, "update finished!\n", FILE_APPEND); $urow->changelog = file_get_contents($ulog); $urow->save(); @unlink($ufile); update::cache_clean(); return true; }
<legend>{{Informations :}}</legend> <pre id="pre_updateInfo"></pre> </div> </div> <div id="md_specifyUpdate"> <form class="form-horizontal"> <fieldset> <div class="form-group"> <label class="col-xs-6 control-label">{{Mise à jour à réappliquer}}</label> <div class="col-xs-6"> <select id="sel_updateVersion" class="form-control"> <option value="">{{Aucune}}</option> <?php $udpates = array(); foreach (update::listCoreUpdate() as $udpate) { $udpates[str_replace(array('.php', '.sql'), '', $udpate)] = str_replace(array('.php', '.sql'), '', $udpate); } usort($udpates, 'version_compare'); foreach ($udpates as $value) { echo '<option value="' . $value . '">' . $value . '</option>'; } ?> </select> </div> </div> <div class="form-group"> <label class="col-xs-6 control-label">{{Mode forcé}}</label> <div class="col-xs-4"> <input type="checkbox" id="cb_forceReapplyUpdate" checked /> </div>
for ($j = 0; $j < count($designee2skills); $j++) { $skill_req2 = $designee2skills[$j]; $mysql = "insert into {$skills_designee2} set plan_id = '{$plan_id}' ,\n\t\t\t\t\tskill_id = '{$skill_req2}'"; $db_object->insert($mysql); } if ($actionplan_designee1) { $mysql = "update {$deployment_plan} set designee1_text = '{$actionplan_designee1}'\n\t\t\t\t\twhere plan_id = '{$plan_id}'"; $db_object->insert($mysql); } if ($actionplan_designee2) { $mysql = "update {$deployment_plan} set designee2_text = '{$actionplan_designee2}'\n\t\t\t\t\twhere plan_id = '{$plan_id}'"; $db_object->insert($mysql); } } } $obj = new update(); if ($fSave) { $action = "save"; } switch ($action) { case NULL: if ($user_id != 1) { $obj->update_plan($db_object, $common, $user_id, $error_msg); } else { $obj->update_plan_admin($db_object, $common, $user_id, $error_msg); } break; case "update": $obj->show_models($db_object, $common, $fPosition, $default, $user_id); break; case "show":
function about_layout() { global $user; global $DB; global $website; global $layout; $navibars = new navibars(); $naviforms = new naviforms(); $current_version = update::latest_installed(); $navibars->title(t(215, 'About')); $navibars->form(); $navibars->add_tab('Navigate CMS'); $navibars->add_tab_content_row(array('<label>' . t(216, 'Created by') . '</label>', '<a href="http://www.naviwebs.com" target="_blank">Naviwebs</a>')); $navibars->add_tab_content_row(array('<label>' . t(220, 'Version') . '</label>', '<span>' . $current_version->version . ' r' . $current_version->revision . '</span>')); $navibars->add_tab_content_row(array('<label>' . t(378, 'License') . '</label>', '<a href="http://www.gnu.org/licenses/gpl-2.0.html" target="_blank">GPL v2</a>')); $navibars->add_tab_content_row(array('<label>' . t(219, 'Copyright') . '</label>', '<a href="http://www.naviwebs.com" target="_blank">© 2010 - ' . date('Y') . ', Naviwebs.com</a>')); $navibars->add_tab(t(218, 'Third party libraries')); $navibars->add_tab_content_row(array('<label>' . t(218, 'Third party libraries') . '</label>', '<a href="http://www.tinymce.com" target="_blank">TinyMCE 4.5.1</a><br />')); // note: the tinymce-codemirror plugin has Apache 2 License, but the author Arjan (from Webgear.nl) has given permission to use and include the code in this application $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/christiaan/tinymce-codemirror" target="_blank">TinyMCE CodeMirror plugin v1.4+ (commit #1d31634)</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/Matmusia/magicline" target="_blank">TinyMCE magic line plugin v1.2</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/josh18/TinyMCE-FontAwesome-Plugin" target="_blank">TinyMCE Font Awesome plugin v2.0.8_nv</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/maschek/imgmap" target="_blank">TinyMCE imgmap plugin v1.09</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://www.assembla.com/spaces/lorem-ipsum" target="_blank">TinyMCE LoremIpsum plugin v0.13</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://www.jquery.com" target="_blank">jQuery v2.2.3 + jQuery Migrate v1.3</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://www.jqueryui.com" target="_blank">jQuery UI v1.11.2</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://fortawesome.github.io/Font-Awesome/" target="_blank">Font Awesome v4.7</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/free-jqgrid/jqGrid" target="_blank">free-jqGrid v4.13.3</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://stanlemon.net/pages/jgrowl" target="_blank">jGrowl v1.2.12</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://select2.github.io" target="_blank">Select2 v4.0.3</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://www.firephp.org" target="_blank">FirePHPCore Server Library 0.3</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://mind2soft.com/labs/jquery/multiselect/" target="_blank">jQuery UIx Multiselect v2.0RC</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://www.jstree.com" target="_blank">jsTree v3.3.1</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/RobinHerbots/jquery.inputmask" target="_blank">jQuery Input Mask v3.3.1</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://www.plupload.com/" target="_blank">Plupload v2.0.0</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://player.bitgravity.com" target="_blank">Bitgravity free video player v6</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://mediaelementjs.com/" target="_blank">MediaElement.js v2.11.2</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/pisi/Longclick" target="_blank">jQuery Long Click v0.3.2 (22-Jun-2010)</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/broofa/node-uuid" target="_blank">node-uuid v1.4.7</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://plugins.jquery.com/project/query-object" target="_blank">jQuery.query v2.1.8 (22-Jun-2010)</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://code.google.com/p/jautochecklist/" target="_blank">jAutochecklist v1.12</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://pupunzi.open-lab.com/mb-jquery-components/jquery-mb-extruder/" target="_blank">jQuery mb.extruder v2.5</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://www.flotcharts.org" target="_blank">Flot (Attractive Javascript plotting for jQuery) v0.8.3</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/ludo/jquery-treetable" target="_blank">jQuery treeTable plugin v2.3.0</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/isocra/TableDnD" target="_blank">jQuery Table DnD plugin v0.7+ (2015/03/23)</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/mathiasbynens/jquery-noselect" target="_blank">jQuery noSelect plugin v51bac1d397 (2012-01-11)</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/ROMB/jquery-dialogextend" target="_blank">jQuery Dialog Extend plugin v2.0.4</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://codemirror.net" target="_blank">CodeMirror source code editor v5.2</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://code.google.com/a/apache-extras.org/p/phpmailer/" target="_blank">PHP Mailer v5.2.2</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://qtip2.com" target="_blank">qTip2 v2.2.1</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://idnaconv.net" target="_blank">Net_IDNA v0.9.0</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://leafletjs.com" target="_blank">Leaflet 1.0.0-rc3</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://aehlke.github.com/tag-it/" target="_blank">jQuery Tag It! v2.0</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://code.google.com/p/cssmin/" target="_blank">CssMin v3.0.1</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://www.verot.net/php_class_upload.htm" target="_blank">class.upload v0.33dev</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://www.framework2.com.ar/dzone/forceUTF8-es/" target="_blank">Encoding UTF8 Class (by Sebastián Grignoli)</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://www.dropzonejs.com" target="_blank">DropzoneJS v4.3.0</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://trentrichardson.com/examples/timepicker/" target="_blank">jQuery Timepicker Addon v1.6.1</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/tzuryby/jquery.hotkeys" target="_blank">jQuery HotKeys v0.8+</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/DrPheltRight/jquery-caret" target="_blank">jQuery Caret v20803a7a16 (Sep 23 2011)</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/tbasse/jquery-truncate" target="_blank">jQuery Truncate Text Plugin v18fdc9195c (Apr 03 2013)</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://www.fyneworks.com/jquery/star-rating/" target="_blank">jQuery Star Rating Plugin v3.13</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="https://github.com/yatt/jquery.base64/" target="_blank">jQuery.base64 v2013.03.26</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://vanderlee.github.io/colorpicker/" target="_blank">jQuery.colorpicker v1.1.5</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://code.google.com/p/ezcookie/" target="_blank">jQuery ezCookie v0.7.01</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://verlok.github.io/lazyload" target="_blank">LazyLoad v:e3cd449 (Mar 10 2016)</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://scripts.incutio.com/xmlrpc/" target="_blank">Incutio XML-RPC Library for PHP v1.7.4</a><br />')); $navibars->add_tab(t(29, 'Images')); $navibars->add_tab_content_row(array('<label>' . t(29, 'Images') . '</label>', '<a href="http://www.famfamfam.com/lab/icons/silk/" target="_blank">famfamfam Silk Icons 1.3 (Mark James)</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://damieng.com/creative/icons/silk-companion-1-icons" target="_blank">Silk Companion I (Damien Guard)</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://www.cagintranet.com/archive/download-famfamfam-silk-companion-2-icon-pack/" target="_blank">Silk Companion II (Chris Cagle)</a><br />')); $navibars->add_tab_content_row(array('<label> </label>', '<a href="http://fontawesome.io" target="_blank">Font Awesome by Dave Gandy - http://fontawesome.io</a><br />')); $navibars->add_tab(t(526, 'Translations')); $navibars->add_tab_content_row(array('<label>English</label>', '<a href="http://www.navigatecms.com">Navigate CMS</a>')); $navibars->add_tab_content_row(array('<label>Català</label>', '<a href="mailto:info@naviwebs.com">Marc Lobato (naviwebs.com)</a><br />')); $navibars->add_tab_content_row(array('<label>Español</label>', '<a href="mailto:info@naviwebs.com">Marc Lobato (naviwebs.com)</a><br />')); $navibars->add_tab_content_row(array('<label>Deutsch</label>', '<a href="http://www.lingudora.com" target="_blank">Dominik Hlusiak (lingudora.com)</a><br />')); return $navibars->generate(); }
</head> <body class="bgimage"> <div class="topspace"></div> <?php include 'externallink.php'; include 'database/Insert.php'; include 'database/update.php'; $individualDetails = array(); $getAlpha = new Select(); if (isset($_GET['usernameid'])) { $individualDetails = $getAlpha->selectWhere("username", "usernameid", $_GET['usernameid']); } if (isset($_POST['submit'])) { $valuearry = array(htmlspecialchars($_POST['usernameid']), htmlspecialchars($_POST['id']), htmlspecialchars($_POST['fullName']), htmlspecialchars($_POST['email']), htmlspecialchars($_POST['dob']), htmlspecialchars($_POST['password']), htmlspecialchars($_POST['currentTime']), htmlspecialchars($_POST['profilePicture']), htmlspecialchars($_POST['fullAddress']), htmlspecialchars($_POST['city']), htmlspecialchars($_POST['phoneNumber']), htmlspecialchars($_POST['personalWebsite']), htmlspecialchars($_POST['languages']), htmlspecialchars($_POST['insearchofjob']), htmlspecialchars($_POST['experianceid']), htmlspecialchars($_POST['galleryid']), htmlspecialchars($_POST['skillid'])); $updateobj = new update(); $updateobj->updateAll("username", "usernameid", $_POST['usernameid'], $valuearry); } ?> </head> <body> <!-- start of navigation bar --> <nav class="navbar navbar-default container navbar-inverse"> <div class="container-fluid"> <div class="navbar-header pull-left"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#mainnavbar" aria-expanded="false"> <span class="icon-bar"></span>
* @version SVN: $Id$ * @link http://www.wowroster.net * @since File available since Release 1.8.0 * @package WoWRoster * @subpackage LuaUpdate */ if (!defined('IN_ROSTER')) { exit('Detected invalid access to this file!'); } if (!$roster->config['authenticated_user']) { print messagebox($roster->locale->act['update_disabled'], $roster->locale->act['update_errors'], 'sred'); return; } // Include update lib require_once ROSTER_LIB . 'update.lib.php'; $update = new update(); // See if UU is requesting this page if (preg_match('/uniuploader/i', $_SERVER['HTTP_USER_AGENT'])) { $update->textmode = true; } // Set template vars $roster->tpl->assign_vars(array('S_DATA' => false, 'S_RESPONSE' => false, 'S_RESPONSE_ERROR' => false, 'S_PASS' => true, 'U_UPDATE' => makelink('update'), 'S_UPDATE_INS' => (bool) $roster->config['update_inst'], 'PAGE_INFO' => $roster->locale->act['pagebar_update'], 'L_UPLOAD_APP' => $roster->config['uploadapp'], 'L_PROFILER' => $roster->config['profiler'], 'L_PASSWORD_TIP' => makeOverlib($roster->locale->act['roster_upd_pw_help'], $roster->locale->act['password'], '', 2, '', ',WRAP,RIGHT'), 'MESSAGES' => '')); // Fetch addon data $update->fetchAddonData(); // Has data been uploaded? if (isset($_POST['process']) && $_POST['process'] == 'process' || $update->textmode) { $messages = $update->parseFiles(); $messages .= $update->processFiles(); $errors = $update->getErrors(); // Normal upload results if (!$update->textmode) {
function guild_pre($guild) { global $roster, $update, $addon; $this->guild_id = $guild['guild_id']; include_once ROSTER_LIB . 'update.lib.php'; $update = new update(); $char = $roster->api2->fetch('guild', array('name' => $guild['GuildName'], 'server' => $guild['Server'], 'fields' => 'achievements')); //$roster->api->Guild->getGuildInfo($guild['Server'],$guild['GuildName'],'2'); $rx = 0; $achi = $char['achievements']; $a = true; $sqlquery2 = "DELETE FROM `" . $roster->db->table('g_achievements', $this->data['basename']) . "` WHERE `member_id` = '" . $this->guild_id . "'"; $result2 = $roster->db->query($sqlquery2); foreach ($achi['achievementsCompleted'] as $var => $info) { $update->reset_values(); $update->add_value('achie_id', $info); $update->add_value('achie_date', $char['achievements']['achievementsCompletedTimestamp']['' . $var . '']); $update->add_value('member_id', $this->guild_id); $querystr = "INSERT INTO `" . $roster->db->table('g_achievements', $this->data['basename']) . "` SET " . $update->assignstr; $rx++; $result = $roster->db->query($querystr); } $achi = $char['achievements']; $a = true; ///* $sqlquery2 = "DELETE FROM `" . $roster->db->table('g_criteria', $this->data['basename']) . "` WHERE `member_id` = '" . $this->guild_id . "'"; $result2 = $roster->db->query($sqlquery2); //we are not gona use criteria yet so much data to process it really slows roster foreach ($achi['criteria'] as $var => $info) { $update->reset_values(); $update->add_value('member_id', $this->guild_id); $update->add_value('crit_id', $info); $update->add_value('crit_date', $char['achievements']['criteriaTimestamp']['' . $var . '']); $update->add_value('crit_value', $char['achievements']['criteriaQuantity']['' . $var . '']); $querystr = "INSERT INTO `" . $roster->db->table('g_criteria', $this->data['basename']) . "` SET " . $update->assignstr; $result = $roster->db->query($querystr); } //*/ $this->messages .= '<li>Updating Achievements: '; $this->messages .= $rx . '</li>'; return true; }
<?php define('IN_EX', true); require '../includes/common.php'; require './class.php'; $user->session_start(); // // ODBC database // $update = new update(); if (!$update->connect('exiva_unis01')) { die('DB>> No connection'); } $update->import_mysql(); $update->import(); $update->export_mysql();
public function save() { $cache = cache::byKey('market::info::' . $this->getLogicalId()); if (is_object($cache)) { $cache->remove(); } $market = self::getJsonRpc(); $params = utils::o2a($this); if (isset($params['changelog'])) { unset($params['changelog']); } switch ($this->getType()) { case 'plugin': $cibDir = dirname(__FILE__) . '/../../tmp/' . $this->getLogicalId(); if (file_exists($cibDir)) { rrmdir($cibDir); } mkdir($cibDir); $exclude = array('tmp'); rcopy(realpath(dirname(__FILE__) . '/../../plugins/' . $this->getLogicalId()), $cibDir, true, $exclude, true); $tmp = dirname(__FILE__) . '/../../tmp/' . $this->getLogicalId() . '.zip'; if (file_exists($tmp)) { if (!unlink($tmp)) { throw new Exception(__('Impossible de supprimer : ', __FILE__) . $tmp . __('. Vérifiez les droits', __FILE__)); } } if (!create_zip($cibDir, $tmp)) { throw new Exception(__('Echec de création de l\'archive zip', __FILE__)); } break; default: $type = $this->getType(); if (!class_exists($type) || !method_exists($type, 'shareOnMarket')) { throw new Exception(__('Aucune fonction correspondante à : ', __FILE__) . $type . '::shareOnMarket'); } $tmp = $type::shareOnMarket($this); break; } if (!file_exists($tmp)) { throw new Exception(__('Impossible de trouver le fichier à envoyer : ', __FILE__) . $tmp); } $file = array('file' => '@' . realpath($tmp)); if (!$market->sendRequest('market::save', $params, 30, $file)) { throw new Exception($market->getError()); } $update = update::byTypeAndLogicalId($this->getType(), $this->getLogicalId()); if (!is_object($update)) { $update = new update(); $update->setLogicalId($this->getLogicalId()); $update->setType($this->getType()); } $update->setConfiguration('version', 'beta'); $update->setLocalVersion(date('Y-m-d H:i:s', strtotime('+10 minute' . date('Y-m-d H:i:s')))); $update->save(); $update->checkUpdate(); }
<?php require_once ROSTER_LIB . 'update.lib.php'; $update = new update(); if (isset($_POST['process']) && $_POST['process'] == 'process') { $a = $roster->api2->fetch('achievements'); $rx = 0; $rc = 0; $q = "TRUNCATE TABLE `" . $roster->db->table('achie', $addon['basename']) . "`;"; $r = $roster->db->query($q); $q = "TRUNCATE TABLE `" . $roster->db->table('crit', $addon['basename']) . "`;"; $r = $roster->db->query($q); foreach ($a['achievements'] as $order => $cat) { //echo $cat['name'].' - '.$cat['id'].'<br>'; if (isset($cat['achievements'])) { foreach ($cat['achievements'] as $d => $achi) { $tooltip = '<div style="width:100%;style="color:#FFB100""><span style="float:right;">' . $achi['points'] . ' Points</span>' . $achi['title'] . '</div><br>' . $achi['description'] . ''; $crit = ''; $crit .= '<br><div class="meta-achievements"><ul>'; foreach ($achi['criteria'] as $r => $d) { $crit .= '<li><div id="crt' . $d['id'] . '">' . $d['description'] . '</div></li>'; $update->reset_values(); $update->add_value('crit_achie_id', $achi['id']); $update->add_value('crit_id', $d['id']); $update->add_value('crit_desc', $d['description']); $querystr = "INSERT INTO `" . $roster->db->table('crit', $addon['basename']) . "` SET " . $update->assignstr; $result = $roster->db->query($querystr); //echo $querystr.'<br>'; $rc++; } $crit .= '</ul></div>';
<?php require_once ROSTER_LIB . 'update.lib.php'; $update = new update(); if (isset($_POST['process']) && $_POST['process'] == 'process') { $a = $roster->api->Data->getAchievInfo(); $rx = 0; $rc = 0; $q = "TRUNCATE TABLE `" . $roster->db->table('achie', $addon['basename']) . "`;"; $r = $roster->db->query($q); $q = "TRUNCATE TABLE `" . $roster->db->table('crit', $addon['basename']) . "`;"; $r = $roster->db->query($q); foreach ($a['achievements'] as $order => $cat) { //echo $cat['name'].' - '.$cat['id'].'<br>'; if (isset($cat['achievements'])) { foreach ($cat['achievements'] as $d => $achi) { $tooltip = '<div style="width:100%;style="color:#FFB100""><span style="float:right;">' . $achi['points'] . ' Points</span>' . $achi['title'] . '</div><br>' . $achi['description'] . ''; $crit = ''; $crit .= '<br><div class="meta-achievements"><ul>'; foreach ($achi['criteria'] as $r => $d) { $crit .= '<li><div id="crt' . $d['id'] . '">' . $d['description'] . '</div></li>'; $update->reset_values(); $update->add_value('crit_achie_id', $achi['id']); $update->add_value('crit_id', $d['id']); $update->add_value('crit_desc', $d['description']); $querystr = "INSERT INTO `" . $roster->db->table('crit', $addon['basename']) . "` SET " . $update->assignstr; $result = $roster->db->query($querystr); //echo $querystr.'<br>'; $rc++; } $crit .= '</ul></div>';
/** * Guild_pre trigger, set out guild id here * * @param array $guild * CP.lua guild data */ function guild_pre($guild) { global $roster, $update; $this->guild_id = $guild['guild_id']; require_once ROSTER_LIB . 'update.lib.php'; $update = new update(); $feed = $roster->api2->fetch('guild', array('name' => $guild['GuildName'], 'server' => $guild['Server'], 'fields' => 'news')); //$roster->api->Guild->getGuildInfo($guild['Server'],$guild['GuildName'],'3'); $tooltip_text = ''; foreach ($feed['news'] as $e => $a) { //print_r($this->data); if ($a['type'] == 'playerAchievement' or $a['type'] == 'guildAchievement') { $tooltip_text = '<div style="width:100%;style="color:#FFB100""><span style="float:right;">' . $a['achievement']['points'] . ' Points</span>' . $a['achievement']['title'] . '</div><br>' . $a['achievement']['description'] . ''; $crit = ''; if (isset($a['featOfStrength']) && $a['featOfStrength'] != 1) { $crit .= '<br><div class="meta-achievements"><ul>'; foreach ($a['achievement']['criteria'] as $r => $d) { $crit .= '<li>' . $d['description'] . '</li>'; } $crit .= '</ul></div>'; } $tooltip_text .= $crit; } else { $tooltip_text = ''; } $title = ''; $update_sql = null; $update->reset_values(); $update->add_value('guild_id', $this->guild_id); $update->add_value('type', $a['type']); if (isset($a['character'])) { $update->add_value('Member', $a['character']); } if ($a['type'] == 'playerAchievement' or $a['type'] == 'guildAchievement') { $update->add_value('Achievement', $tooltip_text); $update->add_value('achievement_icon', $a['achievement']['icon']); $update->add_value('achievement_title', $a['achievement']['title']); $update->add_value('achievement_points', $a['achievement']['points']); $update->add_value('achievement_id', $a['achievement']['id']); if (isset($a['criteria']) && is_array($a['criteria'])) { if (count($a['criteria']) == 1) { $update->add_value('criteria_description', $a['criteria']['description']); } } $title = $a['achievement']['title']; } if ($a['type'] == 'BOSSKILL') { $update->add_value('achievement_points', $a['quantity']); } if (isset($a['itemId'])) { $update->add_value('item_id', $a['itemId']); } $update->add_value('timestamp', $a['timestamp']); if ($a['type'] == 'playerAchievement' or $a['type'] == 'guildAchievement') { $queryx = "SELECT * FROM `" . $roster->db->table('guild_feed', $this->data['basename']) . "` WHERE `guild_id`='" . $this->guild_id . "' and `achievement_title` = '" . $roster->db->escape($title) . "' AND `timestamp` = '" . $a['timestamp'] . "'"; } if ($a['type'] == 'itemLoot' or $a['type'] == 'itemPurchase') { $queryx = "SELECT * FROM `" . $roster->db->table('guild_feed', $this->data['basename']) . "` WHERE `guild_id`='" . $this->guild_id . "' and `item_id` = '" . $a['itemId'] . "'"; } //$queryx = "SELECT * FROM `".$roster->db->table('char_feed',$this->data['basename'])."` WHERE `member_id`='" . $member_id . "' and `timestamp`='".$a['timestamp']."'"; $resultx = $roster->db->query($queryx); $update_sql = $roster->db->num_rows($resultx); $rowg = $roster->db->fetch($resultx); if (!isset($a['itemId']) && $update_sql == 1) { if ($rowg['achievement_title'] != $title) { $update_sql = 0; } } if (isset($a['itemId']) && $update_sql == 1) { if ($a['itemId'] != $rowg['item_id']) { $update_sql = 0; } } if ($update_sql >= '1') { } else { $querystr = "INSERT INTO `" . $roster->db->table('guild_feed', $this->data['basename']) . "` SET " . $update->assignstr . ";"; $result = $roster->db->query($querystr); $this->messages .= '.'; } } return true; }
<?php /* * Module: webNpro Menu Editor v1.0 * Copyright: Kőrösi Zoltán | webNpro - hosting and design | http://webnpro.com | info@webnpro.com * Contact / Feature request: info@webnpro.com (Hungarian / English) * License: Please check CodeCanyon.net for license details. * More license clarification available here: http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ */ // Update the plugin and go back to the plugins settings page require_once dirname(__FILE__) . '/../update/updateclass.php'; // Get license infos $update = new update(); echo $update->update(); unset($update);
6/ Repack SQL, logo, setup.php and package.zip as Navigate.zip 7/ Remove temporary files */ require_once '../cfg/globals.php'; require_once '../cfg/common.php'; require_once '../lib/core/misc.php'; require_once '../lib/external/misc/zipfile.php'; /* global variables */ global $DB; set_time_limit(0); // create database connection or exit $DB = new database(); if (!$DB->connect()) { die(APP_NAME . ' # ERROR<br /> ' . $DB->get_last_error()); } $current_version = update::latest_installed(); /* 1/ Create temporary folder */ // we assume we are in navigate/setup folder if (!@mkdir('distribution')) { die(APP_NAME . ' # ERROR<br /> ' . "Can't create distribution folder."); } /* 2/ Dump database structure */ $sql = array(); $DB->query('SHOW TABLES', 'array'); $tmp = array_keys($DB->first()); $tmp = $tmp[0]; $tables = array_values($DB->result($tmp)); foreach ($tables as $table) { $DB->query('SHOW CREATE TABLE ' . $table, 'array'); $sql[] = 'DROP TABLE IF EXISTS ' . $table . ';'; $table = $DB->first();
} if (init('logicalId') != '' && init('type') != '') { $market = market::byLogicalIdAndType(init('logicalId'), init('type')); } if (!isset($market)) { throw new Exception('404 not found'); } include_file('3rdparty', 'bootstrap.rating/bootstrap.rating', 'js'); include_file('3rdparty', 'slick/slick.min', 'js'); include_file('3rdparty', 'slick/slick', 'css'); include_file('3rdparty', 'slick/slick-theme', 'css'); include_file('3rdparty', 'fancybox/jquery.fancybox', 'js'); include_file('3rdparty', 'fancybox/jquery.fancybox', 'css'); $market_array = utils::o2a($market); $market_array['rating'] = $market->getRating(); $update = update::byLogicalId($market->getLogicalId()); sendVarToJS('market_display_info', $market_array); ?> <div class='row' style='background-color: #e7e7e7; padding-top: 10px; padding-bottom: 10px;position: relative; top: -10px;'> <div class='col-sm-3'> <center> <?php $default_image = 'core/img/no_image.gif'; switch ($market->getType()) { case 'widget': $default_image = 'core/img/no-image-widget.png'; break; case 'plugin': $default_image = 'core/img/no-image-plugin.png';
public static function cron() { if (!self::isStarted()) { config::save('enableScenario', 1); config::save('enableCron', 1); $cache = cache::byKey('jeedom::usbMapping'); $cache->remove(); foreach (cron::all() as $cron) { if ($cron->running() && $cron->getClass() != 'jeedom' && $cron->getFunction() != 'cron') { try { $cron->halt(); } catch (Exception $e) { } } } try { jeedom::start(); } catch (Exception $e) { } try { plugin::start(); } catch (Exception $e) { } touch('/tmp/jeedom_start'); self::event('start'); log::add('core', 'info', 'Démarrage de Jeedom OK'); } self::isDateOk(); try { $c = new Cron\CronExpression(config::byKey('update::check'), new Cron\FieldFactory()); if ($c->isDue()) { $lastCheck = strtotime(config::byKey('update::lastCheck')); if (strtotime('now') - $lastCheck > 3600) { if (config::byKey('update::auto') == 1) { update::checkAllUpdate(); jeedom::update('', 0); } else { config::save('update::check', rand(1, 59) . ' ' . rand(6, 7) . ' * * *'); update::checkAllUpdate(); $updates = update::byStatus('update'); if (count($updates) > 0) { $toUpdate = ''; foreach ($updates as $update) { $toUpdate .= $update->getLogicalId() . ','; } message::add('update', __('De nouvelles mises à jour sont disponibles : ', __FILE__) . trim($toUpdate, ','), '', 'newUpdate'); } } } } $c = new Cron\CronExpression('35 00 * * 0', new Cron\FieldFactory()); if ($c->isDue()) { cache::clean(); DB::optimize(); } $c = new Cron\CronExpression('02 02 * * *', new Cron\FieldFactory()); if ($c->isDue()) { try { log::chunk(); cron::clean(); } catch (Exception $e) { log::add('log', 'error', $e->getMessage()); } } $c = new Cron\CronExpression('21 23 * * *', new Cron\FieldFactory()); if ($c->isDue()) { try { scenario::cleanTable(); user::cleanOutdatedUser(); scenario::consystencyCheck(); } catch (Exception $e) { log::add('scenario', 'error', $e->getMessage()); } } } catch (Exception $e) { } }
<?php /*! * ifsoft.co.uk v1.0 * * http://ifsoft.com.ua, http://ifsoft.co.uk * qascript@ifsoft.co.uk, qascript@mail.ru * * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk) */ include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php"; $page_id = "emoji"; include_once $_SERVER['DOCUMENT_ROOT'] . "/core/initialize.inc.php"; $update = new update($dbo); $update->setChatEmojiSupport(); $update->setGiftsEmojiSupport(); $update->setPhotosEmojiSupport(); $css_files = array("admin.css"); $page_title = APP_TITLE; include_once $_SERVER['DOCUMENT_ROOT'] . "/common/header.inc.php"; ?> <body class="main_page"> <div id="page_wrap"> <!-- BEGIN TOP BAR --> <?php include_once $_SERVER['DOCUMENT_ROOT'] . "/common/admin_panel_topbar.inc.php"; ?> <!-- END TOP BAR -->
require_once dirname(__FILE__) . '/../../core/php/core.inc.php'; include_file('core', 'authentification', 'php'); if (!isConnect()) { throw new Exception(__('401 - Accès non autorisé', __FILE__)); } if (init('action') == 'getConf') { if (!isConnect('admin')) { throw new Exception(__('401 - Accès non autorisé', __FILE__)); } $plugin = plugin::byId(init('id')); $return = utils::o2a($plugin); $return['activate'] = $plugin->isActive(); $return['configurationPath'] = $plugin->getPathToConfigurationById(); $return['checkVersion'] = version_compare(jeedom::version(), $plugin->getRequire()); $return['status'] = market::getInfo(array('logicalId' => $plugin->getId(), 'type' => 'plugin')); $return['update'] = utils::o2a(update::byLogicalId($plugin->getId())); ajax::success($return); } if (init('action') == 'toggle') { if (!isConnect('admin')) { throw new Exception(__('401 - Accès non autorisé', __FILE__)); } $plugin = plugin::byId(init('id')); if (!is_object($plugin)) { throw new Exception(__('Plugin introuvable : ', __FILE__) . init('id')); } $plugin->setIsEnable(init('state')); ajax::success(); } if (init('action') == 'all') { if (!isConnect()) {
public function getUpdate() { return update::byTypeAndLogicalId('plugin', $this->getId()); }
/** * Adding new guild to roster * */ function _startAddGuild() { global $roster, $update; $out = ''; if (isset($_POST['action']) && $_POST['action'] == 'add') { if (isset($_POST['name']) && isset($_POST['server']) && isset($_POST['region'])) { $name = urldecode(trim(stripslashes($_POST['name']))); $server = urldecode(trim(stripslashes($_POST['server']))); $faction = urldecode(trim(stripslashes($_POST['faction']))); $region = strtoupper($_POST['region']); if ($region == "EU" || $region == "US") { if ($this->_checkGuildExist($name, $server, $region)) { // ok the guild exists now we have functions to do this all in one //move because we have allready set th guild to allow in upload rules include_once ROSTER_LIB . 'update.lib.php'; $update = new update(); $this->ApiSync->server = $server; $this->ApiSync->region = $region; $this->ApiSync->guild_name = $name; $this->ApiSync->_getGuildInfo(); $guild_data = $this->ApiSync->data; $update->uploadData['wowroster']['cpProfile'][$server]['Guild'][$name] = $guild_data; $log = $update->processFiles(); echo ' <div class="tier-1-a"> <div class="tier-1-b"> <div class="tier-1-c"> <div class="tier-1-title"> adding ' . $name . ' @ ' . $region . '-' . $server . '</div> <div class="tier-2-a"> <div class="tier-2-b"> <div class="tier-2-title"> Log </div> <div class="border_color syellowborder" style="background:black;height:300px;width:100%;overflow:auto;text-align:left;font-size:10px;"> ' . $log . ' </div> </div> </div> </div> </div> </div>'; } else { $html = " " . $roster->locale->act['error_guild_notexist'] . " "; $out = messagebox($html, $roster->locale->act['error'], $style = 'sred', ''); } } else { $html = " " . $roster->locale->act['error_wrong_region'] . " "; $out = messagebox($html, $roster->locale->act['error'], $style = 'sred', ''); } } else { $html = " " . $roster->locale->act['error_missing_params'] . " "; $out = messagebox($html, $roster->locale->act['error'], $style = 'sred', ''); } } if ($out) { $this->_debug(1, $out, 'Added guild', 'Failed'); print $out; } }
* LICENSE: Licensed under the Creative Commons * "Attribution-NonCommercial-ShareAlike 2.5" license * * @copyright 2002-2008 WoWRoster.net * @license http://creativecommons.org/licenses/by-nc-sa/2.5 Creative Commons "Attribution-NonCommercial-ShareAlike 2.5" * @version SVN: $Id: data_manager.php 1791 2008-06-15 16:59:24Z Zanix $ * @link http://www.wowroster.net * @since File available since Release 1.8.0 * @package WoWRoster * @subpackage RosterCP */ if (!defined('IN_ROSTER') || !defined('IN_ROSTER_ADMIN')) { exit('Detected invalid access to this file!'); } include ROSTER_LIB . 'update.lib.php'; $update = new update(); $start = isset($_GET['start']) ? $_GET['start'] : 0; $roster->output['title'] .= $roster->locale->act['pagebar_uploadrules']; $roster->output['body_onload'] .= "initARC('delete','radioOn','radioOff','checkboxOn','checkboxOff');"; // Change scope to guild, and rerun detection to load default $roster->scope = 'guild'; $roster->get_scope_data(); $roster->tpl->assign_vars(array('U_ACTION' => makelink('&start=' . $start), 'U_GUILD_ID' => $roster->data['guild_id'], 'S_DATA' => false, 'S_RESPONSE' => false, 'S_RESPONSE_ERROR' => false, 'L_CLEAN' => $roster->locale->act['clean'], 'L_SAVE_ERROR_LOG' => $roster->locale->act['save_error_log'], 'L_SAVE_LOG' => $roster->locale->act['save_update_log'], 'L_NAME' => $roster->locale->act['name'], 'L_SERVER' => $roster->locale->act['server'], 'L_REGION' => $roster->locale->act['region'], 'L_CLASS' => $roster->locale->act['class'], 'L_LEVEL' => $roster->locale->act['level'], 'L_UPDATE_ERRORS' => $roster->locale->act['update_errors'], 'L_UPDATE_LOG' => $roster->locale->act['update_log'], 'L_DELETE' => $roster->locale->act['delete'], 'L_DELETE_CHECKED' => $roster->locale->act['delete_checked'], 'L_DELETE_GUILD' => $roster->locale->act['delete_guild'], 'L_DELETE_GUILD_CONFIRM' => $roster->locale->act['delete_guild_confirm'])); /** * Process a new line */ if (isset($_POST['process']) && $_POST['process'] == 'process') { // We have a response $roster->tpl->assign_var('S_RESPONSE', true); if (substr($_POST['action'], 0, 9) == 'delguild_') { $sel_guild = substr($_POST['action'], 9);
function synchGuildbob($server, $memberId = 0, $memberName = false, $region = false, $data) { global $addon, $roster, $update; $this->server = $server; $this->guildId = $memberId; $roster->data['region'] = $region; $this->memberName = $memberName; $this->active_member['starttimeutc'] = gmdate('Y-m-d H:i:s'); include_once ROSTER_LIB . 'update.lib.php'; $update = new update(); $update->fetchAddonData(); $update->uploadData['wowrcp']['cpProfile'][$server]['Guild'][$memberName] = $this->data; $x = $update->processGuildRoster(); $x .= '' . $this->message . '<br>'; $this->_debug(1, true, 'Synced armory data ' . $this->memberName . ' with roster', 'OK'); return $x; //true; }
} public function writeLog($contents) { $fp = fopen($this->settings['cookie_path'] . '/oi_update_log.txt', 'a+'); if ($fp) { fwrite($fp, $contents); fclose($fp); } } public function login($user, $pass) { return; } public function getMyContacts() { return; } public function logout() { return; } } $plugins = $inviter->getPlugins(true); $files_base['base'] = array('openinviter' => array('name' => 'openinviter', 'version' => $inviter->getVersion()), '_base' => array('name' => '_base', 'version' => $inviter->getVersion())); $update = new update(); $update->settings = $inviter->settings; $update->plugins = !empty($plugins) ? array_merge($files_base, $plugins) : $files_base; $update->service_user = '******'; $update->service_pass = '******'; $update->service = 'updater'; $update->makeUpdate();
public function InsertGCache($data) { global $roster, $update; $tooltip = $roster->api->Item->item($data, null, null); $tooltip = str_replace('<br /><br />', "<br />", $tooltip); require_once ROSTER_LIB . 'update.lib.php'; $update = new update(); $update->reset_values(); $update->add_value('gem_id', $data['id']); $update->add_value('gem_name', $data['name']); $update->add_value('gem_color', strtolower($data['gemInfo']['type']['type'])); $update->add_value('gem_tooltip', $tooltip); $update->add_value('gem_texture', $data['icon']); $update->add_value('gem_bonus', $data['gemInfo']['bonus']['name']); $update->add_value('locale', $roster->config['api_url_locale']); $update->add_value('timestamp', time()); $update->add_value('json', json_encode($data, true)); $querystr = "INSERT INTO `" . $roster->db->table('api_gems') . "` SET " . $update->assignstr; $result = $roster->db->query($querystr); }