<textarea name='description' id="description" rows='3' cols='50' class="form-control" placeholder='Video Description'><?php echo Input::Get("description"); ?> </textarea> </div> </div> <div class="formField"> <label for="defTime"><?php echo lang('POST_INTERVAL_SEC'); ?> <a href="#" onclick="return false;" data-toggle="tooltip" data-placement="top" style="float:right" title="The random interval is activated by default. the interval will be (Interval - Interval+30 seconds) Example: if you choose 60 Sec real interval will be 60 sec - 90 Sec" ><span class="glyphicon glyphicon-question-sign"></span></a></label> <select name='defTime' id="defTime" class="form-control"> <?php $selected = Input::Get('defTime'); if (isset($user->Options()->postInterval)) { $selected = Input::Get('defTime') ? Input::Get('defTime') : $user->Options()->postInterval; } for ($i = 10; $i <= 1500; $i += 30) { if ($i == $selected) { echo "<option value='{$i}' selected>{$i} Sec</option>"; } else { echo "<option value='{$i}'>{$i} Sec</option>"; } if ($i == 10) { $i = 0; } } ?> </select> </div>
if (!$user->isLoggedIn()) { Redirect::to(Options::Get("siteurl") . 'signin.php'); exit; } /* |------------------------------------------------- | Set Timezone for the current user |------------------------------------------------- | */ if (isset($user->Options()->timezone)) { if ($user->Options()->timezone) { date_default_timezone_set($user->Options()->timezone); } } /* |------------------------------------ | Set language |------------------------------------ | */ $user = new User(); $userLang = isset($user->Options()->lang) ? $user->Options()->lang : DEFAULT_LANG; define('USER_LANG', $userLang); require_once DIR_CORE . "/language/language.php"; /* |-------------------------------- | Check for updates |-------------------------------- */ Options::CheckForUpdate();
if (!defined('ABSPATH')) { exit('No direct script access allowed'); } if (!Session::Exists('scheduleInProcess')) { // Set a session to prevent multi proccess at once Session::Put('scheduleInProcess', true); // Get posts that have status 0 (not completed) and pause = 0 and date <= current date $scheduledposts = new scheduledposts(); $fb = new Facebook(); $posts = new Posts(); $spintax = new Spintax(); foreach ($scheduledposts->post() as $scheduled) { $user = new User($scheduled->userid); // Set user timezone if the user defined the timezone if (isset($user->Options()->timezone)) { if ($user->Options()->timezone) { date_default_timezone_set($user->Options()->timezone); } } // Check if the post date <= current datetime of the user // Get current time $currentDateTime = new DateTime(); $next_post_time = new DateTime($scheduled->next_post_time); if (strtotime($currentDateTime->format("Y-m-d H:i")) >= strtotime($next_post_time->format("Y-m-d H:i"))) { // get the post $post = $posts->GetPost($scheduled->post_id); // Post is ready if (count($post) == 0) { logs::Save($scheduled->id, lang('POST_NOT_FOUND')); } else {
<div class="input-group"> <label for="timezone"> <?php echo lang('TIMEZONE'); ?> | <?php echo lang('CURRENT_TIME'); ?> : <?php echo date("Y-m-d H:i"); ?> </label> <select name='timezone' id="timezone" class="form-control"> <?php if (isset($user->Options()->timezone)) { $selected = Input::Get('timezone') ? Input::Get('timezone') : $user->Options()->timezone; } else { $selected = Input::Get('timezone'); } foreach ($timezones as $timezone) { $select = $selected == $timezone ? "selected" : ""; echo "<option value='" . $timezone . "' " . $select . ">" . $timezone . "</option>"; } ?> </select> </div> <div class="input-group"> <label for="language"><?php
public function GetGroups($category = null) { $user = new User(); $fbAccount = $this->UserDefaultFbAccount(); $groups = null; if ($category) { $groups = DB::GetInstance()->QueryGet("SELECT groups FROM groups_category WHERE id = ? AND fb_id = ? AND user_id = ? ", array($category, $fbAccount, $user->data()->id)); } else { if (Session::exists("groupscategory")) { if (Session::get("groupscategory") != -1) { if ($this->currentFbAccountHasCat(Session::get("groupscategory"))) { $groups = DB::GetInstance()->QueryGet("SELECT groups FROM groups_category WHERE id = ? AND fb_id = ? AND user_id = ? ", array(Session::get("groupscategory"), $fbAccount, $user->data()->id)); } else { $groups = DB::GetInstance()->QueryGet("SELECT groups FROM fb_accounts WHERE fb_id = ? AND user_id = ? ", array($fbAccount, $user->data()->id)); } } else { $groups = DB::GetInstance()->QueryGet("SELECT groups FROM fb_accounts WHERE fb_id = ? AND user_id = ? ", array($fbAccount, $user->data()->id)); } } else { $groups = DB::GetInstance()->QueryGet("SELECT groups FROM fb_accounts WHERE fb_id = ? AND user_id = ? ", array($fbAccount, $user->data()->id)); } } if (isset($groups->first()->groups)) { $listGroups = json_decode($groups->first()->groups, true); // Check show open group only option is on unset non open groups if (isset($user->Options()->openGroupOnly)) { if ($user->Options()->openGroupOnly) { $i = 0; foreach ($listGroups as $group) { if (isset($group['privacy'])) { if ($group['privacy'] != 'OPEN') { unset($listGroups[$i]); } } $i++; } } } $this->totalGroups = count($listGroups); return $listGroups; } return false; }