コード例 #1
0
ファイル: sync_cron.php プロジェクト: cls1991/ryzomcore
<?php

/**
* This small piece of php code calls the syncdata() function of Sync class.
* @author Daan Janssens, mentored by Matthew Lagoe
*/
require '../../config.php';
require_once $AMS_LIB . '/libinclude.php';
Sync::syncdata();
コード例 #2
0
ファイル: index.php プロジェクト: cls1991/ryzomcore
 session_cache_limiter('nocache');
 session_start();
 header("Expires: Mon, 01 May 2000 06:00:00 GMT");
 header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
 header("Cache-Control: max-age=1");
 header("Cache-Control: no-store, no-cache, must-revalidate");
 header("Cache-Control: post-check=0, pre-check=0", false);
 header("Pragma: no-cache");
 // Running Cron
 if (isset($_GET["cron"])) {
     if ($_GET["cron"] == "true") {
         Sync::syncdata(false);
     }
 }
 // Always try to sync on page load, ie "lazy" cron
 Sync::syncdata(false);
 // Decide what page to load
 if (!isset($_GET["page"])) {
     if (isset($_SESSION['user'])) {
         if (Ticket_User::isMod(unserialize($_SESSION['ticket_user']))) {
             $page = 'dashboard';
         } else {
             $page = 'show_user';
         }
     } else {
         // default page
         $page = 'login';
     }
 } else {
     // if the session exists load page with $_GET requests
     if (isset($_SESSION['user'])) {