コード例 #1
0
ファイル: session.class.php プロジェクト: reactvideos/Website
 /**
  * Function used to get sessins
  *
  * @todo : They are updated on every page refresh, highly  critical for performance.
  */
 function get_sessions()
 {
     global $db, $pages;
     $results = $db->select(tbl($this->tbl), '*', " session ='" . $this->id . "' ");
     $cur_url = $pages->GetCurrentUrl();
     if (getConstant('THIS_PAGE') != 'cb_install') {
         if (getConstant('THIS_PAGE') != 'ajax') {
             $db->update(tbl($this->tbl), array("last_active", "current_page"), array(now(), $cur_url), " session='" . $this->id . "' ");
         } else {
             $db->update(tbl($this->tbl), array("last_active"), array(now()), " session='" . $this->id . "' ");
         }
     }
     return $results;
 }
コード例 #2
0
ファイル: common.php プロジェクト: Coding110/cbvideo
define('PLAYLIST_COVERS_URL', IMAGES_URL . '/playlist_covers');
if (!file_exists(PLAYLIST_COVERS_DIR)) {
    mkdir(PLAYLIST_COVERS_DIR, 0777);
}
$ClipBucket->upload_opt_list = array('file_upload_div' => array('title' => lang('upload_file'), 'func_class' => 'Upload', 'load_func' => 'load_upload_form'), 'remote_upload_div' => array('title' => lang('remote_upload'), 'func_class' => 'Upload', 'load_func' => 'load_remote_upload_form'));
Assign('LANG', $LANG);
Assign('langf', getConstant('LANG'));
Assign('lang_count', isset($languages) ? count($languages) : false);
//Configration of time formate
$config['date'] = '%I:%M %p';
$config['time'] = '%H:%M';
assign('config', $config);
//Assign Player Div Id
Assign('player_div_id', $row['player_div_id']);
//Asigning Page
Assign('page', getConstant('PAGE'));
//Add Modules
require 'modules.php';
/*
REGISTER OBJECTS FOR SMARTY
*/
$Smarty->assign_by_ref('pages', $pages);
$Smarty->assign_by_ref('myquery', $myquery);
$Smarty->assign_by_ref('userquery', $userquery);
$Smarty->assign_by_ref('signup', $signup);
$Smarty->assign_by_ref('Upload', $Upload);
$Smarty->assign_by_ref('cbgroup', $cbgroup);
$Smarty->assign_by_ref('db', $db);
$Smarty->assign_by_ref('adsObj', $adsObj);
$Smarty->assign_by_ref('formObj', $formObj);
$Smarty->assign_by_ref('Cbucket', $Cbucket);