public function fetch($chid, $usid, $apik) { $api_ret = $this->fetch_xml("/char/Notifications.xml.aspx", array("characterID" => $chid, "keyID" => $usid, "vCode" => $apik), 6 * 60 * 60); $this->Message = ""; // if (!$api_ret || !$this->cacheHit) // api does not support partial updates! wtf return $api_ret; if ($this->age < 30 * 60) { $this->Message = "will check for new notifications in " . niceTime(30 * 60 - $this->age); return $api_ret; } // 30 minute timer is just for the first update check, from there on you can check instantly, but that's not very nice... // also, i would have to preserve the initial time, which would be annoying. // try to update with new mails $new_notif = simple_api_retrieve("/char/Notifications.xml.aspx", array("characterID" => $chid, "keyID" => $usid, "vCode" => $apik)); if ($new_notif != null && !$new_notif->error) { // did it work? $api_upd = $new_notif->value; $newMessages = $api_upd->xpath("/eveapi/result/rowset[@name='notifications']/row"); $nm = count($newMessages); if ($nm > 0) { // new mails! $this->Message = "retrieved {$nm} new notification" . ($nm > 1 ? "s" : ""); // merge the old with the new, so it appears like a new one foreach ($this->api->xpath("/eveapi/result/rowset[@name='notifications']/row") as $row) { $newrow = $api_upd->result->rowset->addChild("row"); foreach ($row->attributes() as $name => $value) { $newrow->addAttribute($name, $value); } } $api_upd->cachedUntil = $this->api->cachedUntil; $this->api = $api_upd; } else { $this->Message = "retrieved notifications; no new messages found."; } } else { $this->Message = "api error occured while fetching new notifications."; // didn't work, oh well... } // update the DB with the new list of mails $this->api->currentTime = gmdate("Y-m-d H:i:s"); $this->cache->update($this->api); $this->APIInit($this->cache); return $this->LoadAPI(); }
public function loadAPI() { $this->skillTraining = (string) $this->api->result->skillInTraining != "0"; if (!$this->skillTraining) { return false; } $this->skillID = (string) $this->api->result->trainingTypeID; $this->skillName = $this->Db->getNameFromTypeId($this->skillID); $this->skillLvl = (string) $this->api->result->trainingToLevel; // figure out the time left @($oldTz = date_default_timezone_get()); date_default_timezone_set("UTC"); $end = strtotime((string) $this->api->result->trainingEndTime); $gmtTime = time(); $timeLeft = $end - $gmtTime; $rem = niceTime($timeLeft); $this->gmtTime = strftime("%H:%M:%S", $gmtTime); $this->timeLeft = $rem; $this->timeLeftRaw = $end; date_default_timezone_set($oldTz); return true; }
/** * Display time and using javascript * update it regularly... */ function what_time($time, $is_time = true) { if (!$is_time) { $time = strtotime($time); } $date = date('Y-m-d H:i:s', $time); $date = niceTime($date); $final_date = '<span class="cb_time" data-time="' . date("Y-m-d", $time) . 'T' . date("H:i:s", $time) . 'Z" >' . $date . '</span>'; return $final_date; }
/** * Used to display collection voterts details. * User who rated, how many stars and when user rated */ function collection_voters($id, $return_array = FALSE, $show_all = FALSE) { global $json; $c = $this->get_collection($id); if (!empty($c) && $c['userid'] == userid() || $show_all === TRUE) { global $userquery; $voters = $c['voters']; if (phpversion() < "5.2.0") { $voters = $json->json_decode($voters, TRUE); } else { $voters = json_decode($voters, TRUE); } if (!empty($voters)) { if ($return_array) { return $voters; } else { foreach ($voters as $id => $details) { $username = get_username($id); $output = "<li id='user" . $id . $c['collection_id'] . "' class='PhotoRatingStats'>"; $output .= "<a href='" . $userquery->profile_link($id) . "'>{$username}</a>"; $output .= " rated <strong>" . $details['rate'] / 2 . "</strong> stars <small>("; $output .= niceTime($details['time']) . ")</small>"; $output .= "</li>"; echo $output; } } } } else { return false; } }
function content_55e44854c085f1_90364963($_smarty_tpl) { if (!is_callable('smarty_modifier_truncate')) { include '/var/www/includes/smartyv3/plugins/modifier.truncate.php'; } if ($_smarty_tpl->tpl_vars['display_type']->value == 'normal' || $_smarty_tpl->tpl_vars['display_type']->value == '') { ?> <div class="item_video"> <div class="cb_item_container clearfix"> <div class="cb_item_thumb video_thumb relative" > <a href="<?php echo videoLink($_smarty_tpl->tpl_vars['video']->value); ?> " title="<?php echo title($_smarty_tpl->tpl_vars['video']->value['title']); ?> "> <?php if ($_smarty_tpl->tpl_vars['video']->value['broadcast'] == 'private') { ?> <span class="private_video">PRIVATE</span> <?php } ?> <span class="fa fa-play play-icon"></span> <span class="duration"><?php if ($_smarty_tpl->tpl_vars['video']->value['duration'] > 1) { echo SetTime($_smarty_tpl->tpl_vars['video']->value['duration']); } else { ?> 00:00<?php } ?> </span> <img class="img" src="<?php echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video']->value, 'size' => '160x90'), $_smarty_tpl); ?> " border="1" /> </a> <?php echo ANCHOR(array('place' => 'in_video_thumb', 'data' => $_smarty_tpl->tpl_vars['video']->value), $_smarty_tpl); ?> <img src="<?php echo $_smarty_tpl->tpl_vars['imageurl']->value; ?> /dot.gif" data-quick="quick-<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> " class="add_icon cb_quickie cb-btn-quick-<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> " onclick="add_quicklist(this,'<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> ')" title="Add <?php echo $_smarty_tpl->tpl_vars['video']->value['title']; ?> to Quicklist" alt="Quicklist" /> </div> <h5> <a href="<?php echo videoLink($_smarty_tpl->tpl_vars['video']->value); ?> "><?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video']->value['title'], 20); ?> </a> </h5> <div class="clearfix views-time"> <span class="font1"><span class="bg-eye"></span> <?php echo $_smarty_tpl->tpl_vars['video']->value['views']; ?> views</span> <span class="font2"><span class="bg-time"></span> <?php echo niceTime($_smarty_tpl->tpl_vars['video']->value['date_added']); ?> </span> </div> </div> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['display_type']->value == 'user_videos') { ?> <div class="col-md-3 col-sm-4 col-xs-6 video_thumb "> <a href="<?php echo videoLink($_smarty_tpl->tpl_vars['video']->value); ?> " title="<?php echo title($_smarty_tpl->tpl_vars['video']->value['title']); ?> "> <span class="fa fa-play play-icon"></span> <img alt="<?php echo title($_smarty_tpl->tpl_vars['video']->value['title']); ?> " src="<?php echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video']->value, 'size' => '171x120'), $_smarty_tpl); ?> " id="thumbs_<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> " title="<?php echo title($_smarty_tpl->tpl_vars['video']->value['title']); ?> "/> </a> <p class="cbHomeVidDuration duration_view"> <?php if ($_smarty_tpl->tpl_vars['video']->value['duration'] > 1) { ?> <?php echo SetTime($_smarty_tpl->tpl_vars['video']->value['duration']); ?> <?php } else { ?> 00:00 <?php } ?> </p> <a href="<?php echo videoLink($_smarty_tpl->tpl_vars['video']->value); ?> " title="<?php echo title($_smarty_tpl->tpl_vars['video']->value['title']); ?> "><h5> <b> <?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video']->value['title'], 25); ?> </b></h5></a> <span class="pull-left"><h5><small><?php echo $_smarty_tpl->tpl_vars['video']->value['views']; ?> views</small></h5></span> <span class="pull-right"><h5><small><?php echo niceTime($_smarty_tpl->tpl_vars['video']->value['date_added']); ?> </small></h5></span> </div> <?php } }
function content_56afd7ac2d1e50_34319142($_smarty_tpl) { if (!is_callable('smarty_modifier_truncate')) { include '/var/www/html/includes/smartyv3/plugins/modifier.truncate.php'; } ?> <div class="heading clearfix"> <h2 class="pull-left">Video Manager</h2> <?php echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['layout_dir']->value . "/blocks/advanced_search.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> </div> <!-- DIsplaying Videos --> <form name="video_manage marginBottomLarge" method="post"> <div class="btn-group"> <input class="btn btn-primary btn-xs" type="submit" name="activate_selected" value="Activate" class="button"/> <?php if ($_GET['active'] != 'no') { ?> <input class="btn btn-primary btn-xs" type="submit" name="deactivate_selected" value="Deactivate" class="button"/> <?php } ?> <input class="btn btn-primary btn-xs" type="submit" name="make_featured_selected" value="Make Featured" class="button"/> <input class="btn btn-primary btn-xs" type="submit" name="make_unfeatured_selected" value="Make Unfeatured" class="button"/> <input class="btn btn-primary btn-xs" type="submit" name="delete_selected" value="Delete" class="button" onclick="return _cb.confirm_it('Are you sure you want to delete selected video(s)')"/> </div> <table class="table table-bordered table-striped manageUsersTable marginTop"> <tr> <td> <input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td> <td>VID</td> <td>Videos Details</td> <td> </td> </tr> <?php if ($_smarty_tpl->tpl_vars['videos']->value) { ?> <?php $_smarty_tpl->tpl_vars['video'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['video']->_loop = false; $_from = $_smarty_tpl->tpl_vars['videos']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['video']->key => $_smarty_tpl->tpl_vars['video']->value) { $_smarty_tpl->tpl_vars['video']->_loop = true; ?> <tr> <td> <input name="check_video[]" type="checkbox" id="check_video" value="<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> "/> </td> <td><?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> </td> <td> <div class="row"> <div class="col-md-10"> <div class="row"> <div class="col-md-3"> <img src="<?php echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video']->value), $_smarty_tpl); ?> " width="130" height="80" id="thumbs_<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> " title=""/> </div> <div class="col-md-9"> <a href="edit_video.php?video=<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> "> <?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video']->value['title'], 80); ?> </a>(<?php if ($_smarty_tpl->tpl_vars['video']->value['duration'] > 1) { echo SetTime($_smarty_tpl->tpl_vars['video']->value['duration']); } else { ?> 00:00<?php } ?> )<br> <span class="labels1"> <strong><?php echo niceTime($_smarty_tpl->tpl_vars['video']->value['date_added']); ?> </strong> | <?php echo smarty_lang(array('code' => 'views'), $_smarty_tpl); ?> : <strong><?php echo number_format($_smarty_tpl->tpl_vars['video']->value['views']); ?> </strong></span> <div class="labels mtl"> <span class="label <?php if ($_smarty_tpl->tpl_vars['video']->value['active'] == 'yes') { ?> label-success<?php } else { ?> label-danger<?php } ?> "> <?php if ($_smarty_tpl->tpl_vars['video']->value['active'] == 'yes') { ?> Active<?php } else { ?> Inactive<?php } ?> </span> <span class="label <?php if ($_smarty_tpl->tpl_vars['video']->value['status'] == 'Successful') { ?> label-success<?php } else { ?> label-warning<?php } ?> "> <?php echo $_smarty_tpl->tpl_vars['video']->value['status']; ?> </span> <?php if ($_smarty_tpl->tpl_vars['video']->value['featured'] == 'yes') { ?> <span class="label label-info"> Featured</span> <?php } ?> <?php $_smarty_tpl->tpl_vars['links'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['links']->_loop = false; $_from = $_smarty_tpl->tpl_vars['cbvid']->value->video_manager_link_new; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['links']->key => $_smarty_tpl->tpl_vars['links']->value) { $_smarty_tpl->tpl_vars['links']->_loop = true; ?> <?php echo $_smarty_tpl->tpl_vars['cbvid']->value->video_manager_link_new($_smarty_tpl->tpl_vars['links']->value, $_smarty_tpl->tpl_vars['video']->value); ?> <?php } ?> </div> </div> </div> </div> <div class="col-md-2"> <a href="view_user.php?uid=<?php echo $_smarty_tpl->tpl_vars['video']->value['userid']; ?> "><?php echo $_smarty_tpl->tpl_vars['video']->value['username']; ?> </a> </div> </div> </td> <td> <div class="dropdown"> <button id="dropdownMenu1" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown"> Actions <i class="caret"></i></button> <ul class="dropdown-menu pull-right" aria-labelledby="dropdownMenu1" role="menu"> <li><a role="menuitem" tabindex="-1" href="edit_video.php?video=<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> " class="">Edit</a></li> <li><a role="menuitem" tabindex="-1" href="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /watch_video.php?v=<?php echo $_smarty_tpl->tpl_vars['video']->value['videokey']; ?> "target="_blank">Watch</a> </li> <?php if ($_smarty_tpl->tpl_vars['video']->value['featured'] == 'yes') { ?> <li><a role="menuitem" tabindex="-1" href="?make_unfeature=<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> ">Make Unfeatured</a></li> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['video']->value['featured'] == 'no') { ?> <li><a role="menuitem" tabindex="-1" href="?make_feature=<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> ">Make Featured</a></li> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['video']->value['active'] == 'yes') { ?> <li><a role="menuitem" tabindex="-1" href="?deactivate=<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> ">Deactivate</a> </li> <?php } else { ?> <li><a role="menuitem" tabindex="-1" href="?activate=<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> ">Activate</a> </li> <?php } ?> <li><a role="menuitem" tabindex="-1" href="view_conversion_log.php?file_name=<?php echo $_smarty_tpl->tpl_vars['video']->value['file_name']; ?> ">File conversion details</a></li> <li class="divider"></li> <li><a role="menuitem" tabindex="-1" href="?delete_video=<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> ">Delete</a> </li> <?php $_smarty_tpl->tpl_vars['links'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['links']->_loop = false; $_from = $_smarty_tpl->tpl_vars['cbvid']->value->video_manager_link; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['links']->key => $_smarty_tpl->tpl_vars['links']->value) { $_smarty_tpl->tpl_vars['links']->_loop = true; ?> <?php echo $_smarty_tpl->tpl_vars['cbvid']->value->video_manager_link($_smarty_tpl->tpl_vars['links']->value, $_smarty_tpl->tpl_vars['video']->value); ?> <?php } ?> </ul> </div> </td> </tr> <?php } ?> </table> <?php } else { ?> <div align="center"><strong><em>No Video Found</em></strong></div> <?php } ?> <div class="btn-group marginBotoomLarge marginTopLarge paddingBotoomLarge paddingTopLarge"> <input class="btn btn-primary btn-xs" type="submit" name="activate_selected" value="Activate" class="button"/> <input class="btn btn-primary btn-xs" type="submit" name="deactivate_selected" value="Deactivate" class="button"/> <input class="btn btn-primary btn-xs" type="submit" name="make_featured_selected" value="Make Featured" class="button"/> <input class="btn btn-primary btn-xs" type="submit" name="make_unfeatured_selected" value="Make Unfeatured" class="button"/> <input class="btn btn-primary btn-xs" type="submit" name="delete_selected" value="Delete" class="button" onclick="return _cb.confirm_it('Are you sure you want to delete selected video(s)')"/> </div> </form> <!-- DIsplaying Videos Ends--> <?php echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/pagination.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <div class="marginBottomLarge"></div> <?php }
return '1 day ago.'; } else { return floor($delta / 86400) . ' days ago.'; } } } } } } } if (isset($_POST["i"]) && $_POST["i"] != "" && is_numeric($_POST["i"])) { $lastId = $_POST["i"]; $result = Query("SELECT * FROM chats WHERE id > '" . $lastId . "' ORDER BY id DESC LIMIT 20;"); $output = ""; $firstRow = true; $lastSent = "NEVER"; while ($row = mysql_fetch_array($result)) { if ($firstRow) { $lastId = $row["id"]; $lastSent = $row["time"]; $firstRow = false; } $output = $row["user"] . "\t" . $row["msg"] . "\n" . $output; } $output = $lastId . "\n" . $output; if ($_POST["i"] == "0") { $output = $output . "\nConsole\tWelcome to A3P. Last message sent " . ($lastSent == "NEVER" ? $lastSent : niceTime(strtotime($lastSent))); } echo $output; } CloseConnection();
function content_56afd77ab2a977_56293857($_smarty_tpl) { if (!is_callable('smarty_modifier_truncate')) { include '/var/www/html/includes/smartyv3/plugins/modifier.truncate.php'; } if (!is_callable('smarty_modifier_date_format')) { include '/var/www/html/includes/smartyv3/plugins/modifier.date_format.php'; } ?> <div class="heading"> <h2>ClipBucket V2.7 Dashboard</h2> </div> <div class="row"> <div class="col-md-6"> <div class="tabbable"> <ul class="nav nav-tabs" id="myTab"> <li class="active"> <a data-toggle="tab" href="#statistics"> <h5>Statistics</h5> </a> </li> <li class=""> <a data-toggle="tab" href="#nusers"> <h5>New Users</h5> </a> </li> <li class=""> <a data-toggle="tab" href="#mvideos"> <h5>Most Viewed Videos</h5> </a> </li> <li class=""> <a data-toggle="tab" href="#fobjects"> <h5>Flagged Objects</h5> </a> </li> </ul> <div class="tab-content"> <div id="statistics" class="tab-pane active"> <div class="tabbable tabs-left"> <ul class="nav nav-tabs" id="myTab1"> <li class="active"> <a data-toggle="tab" href="#sweek"> This Week </a> </li> <li class=""> <a data-toggle="tab" href="#smonth"> This Month </a> </li> <li class=""> <a data-toggle="tab" href="#soday"> Today </a> </li> </ul> <div class="tab-content"> <div id="sweek" class="tab-pane active"> <div id="weekly_stats" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div> </div> <div id="smonth" class="tab-pane"> <div id="monthly_stats" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div> </div> <div id="soday" class="tab-pane"> <div id="daily_stats" class="flot_chart1"> <img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/> </div> </div> </div> </div> </div> <div id="nusers" class="tab-pane"> <div class="tabbable tabs-left"> <ul class="nav nav-tabs" id="myTab1"> <li class="active"> <a data-toggle="tab" href="#uweek"> This Week </a> </li> <li class=""> <a data-toggle="tab" href="#umonth"> This Month </a> </li> <li class=""> <a data-toggle="tab" href="#utoday"> Today </a> </li> </ul> <div class="tab-content"> <div id="uweek" class="tab-pane active"> <div id="weekly_users" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div> </div> <div id="umonth" class="tab-pane"> <div id="monthly_users" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div> </div> <div id="utoday" class="tab-pane"> <div id="daily_users" class="flot_chart1"> <img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div> </div> </div> <div class="users marginTopLarge"> <?php if ($_smarty_tpl->tpl_vars['users']->value) { ?> <?php $_smarty_tpl->tpl_vars['u'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['u']->_loop = false; $_from = $_smarty_tpl->tpl_vars['users']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['u']->key => $_smarty_tpl->tpl_vars['u']->value) { $_smarty_tpl->tpl_vars['u']->_loop = true; ?> <div class="row"> <div class="col-md-12"> <div class="row marginBottom"> <div class="col-md-2"> <a href="view_user.php?uid=<?php echo $_smarty_tpl->tpl_vars['u']->value['userid']; ?> "> <img src="<?php echo $_smarty_tpl->tpl_vars['userquery']->value->getUserThumb($_smarty_tpl->tpl_vars['u']->value, 'small'); ?> " class="img-thumbnail oneUserImage" /> </a> </div> <div class="col-md-10"> <a href="view_user.php?uid=<?php echo $_smarty_tpl->tpl_vars['u']->value['userid']; ?> " target="_blank"><?php echo $_smarty_tpl->tpl_vars['u']->value['username']; ?> </a>(<?php echo $_smarty_tpl->tpl_vars['u']->value['email']; ?> ) <button id="dropdownMenu1" class="btn btn-primary btn-xs dropdown-toggle pull-right" data-toggle="dropdown"> <i class="glyphicon glyphicon-cog"></i><i class="icon-angle-down icon-on-right"></i> </button> <ul class="dropdown-menu pull-right" aria-labelledby="dropdownMenu1" role="menu"> <?php if ($_smarty_tpl->tpl_vars['u']->value['ban_status'] == 'yes') { ?> <li><a role="menuitem" tabindex="-1" href="?unban=<?php echo $_smarty_tpl->tpl_vars['u']->value['userid']; ?> ">Unban Member</a></li> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['u']->value['ban_status'] == 'no') { ?> <li><a role="menuitem" tabindex="-1" href="?ban=<?php echo $_smarty_tpl->tpl_vars['u']->value['userid']; ?> ">Ban Member</a></li> <?php } ?> <li><a role="menuitem" tabindex="-1" href="view_user.php?uid=<?php echo $_smarty_tpl->tpl_vars['u']->value['userid']; ?> ">Edit</a></li> <li><a role="menuitem" tabindex="-1" href="members.php?deleteuser=<?php echo $_smarty_tpl->tpl_vars['u']->value['userid']; ?> ">Delete</a></li> </ul> </div> </div> </div> </div> <?php } ?> <?php } ?> </div> </div> </div> <div id="mvideos" class="tab-pane"> <div class="tabbable tabs-left"> <ul class="nav nav-tabs" id="myTab1"> <li class="active"> <a data-toggle="tab" href="#vweek"> This Week </a> </li> <li class=""> <a data-toggle="tab" href="#vmonth"> This Month </a> </li> <li class=""> <a data-toggle="tab" href="#vtoday"> Today </a> </li> </ul> <div class="tab-content"> <div id="vweek" class="tab-pane active"> <div id="weekly_users" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div> </div> <div id="vmonth" class="tab-pane"> <div id="monthly_users" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div> </div> <div id="vtoday" class="tab-pane"> <div id="daily_users" class="flot_chart1"> <img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div> </div> </div> </div> <div class="vids marginTopLarge"> <?php if ($_smarty_tpl->tpl_vars['videos']->value) { ?> <?php $_smarty_tpl->tpl_vars['video'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['video']->_loop = false; $_from = $_smarty_tpl->tpl_vars['videos']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['video']->key => $_smarty_tpl->tpl_vars['video']->value) { $_smarty_tpl->tpl_vars['video']->_loop = true; ?> <div class="row"> <div class="col-md-3"> <img src="<?php echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video']->value), $_smarty_tpl); ?> " height="80" class="img-thumbnail" id="thumbs_<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> " title="<?php echo $_smarty_tpl->tpl_vars['video']->value['title']; ?> "/> </div> <div class="col-md-9"> <a href="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /watch_video.php?v=<?php echo $_smarty_tpl->tpl_vars['video']->value['videokey']; ?> "target="_blank"> <?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video']->value['title'], 45); ?> </a> <strong class="btn btn-primary btn-xs pull-right"> <?php echo smarty_lang(array('code' => 'views'), $_smarty_tpl); ?> : <?php echo format_number($_smarty_tpl->tpl_vars['video']->value['views']); ?> </strong> </div> </div> <hr> <?php } ?> <?php } ?> </div> </div> <div id="fobjects" class="tab-pane"> <div class="tabbable tabs-left"> <ul class="nav nav-tabs" id="myTab1"> <li class="active"> <a data-toggle="tab" href="#fweek"> This Week </a> </li> <li class=""> <a data-toggle="tab" href="#fmonth"> This Month </a> </li> <li class=""> <a data-toggle="tab" href="#ftoday"> Today </a> </li> </ul> <div class="tab-content"> <div id="fweek" class="tab-pane active"> <div id="weekly_users" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div> </div> <div id="fmonth" class="tab-pane"> <div id="monthly_users" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div> </div> <div id="ftoday" class="tab-pane"> <div id="daily_users" class="flot_chart1"> <img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div> </div> </div> </div> <div class="flaggedUser marginTopLarge"> <?php if ($_smarty_tpl->tpl_vars['flaggedUsers']->value) { ?> <?php $_smarty_tpl->tpl_vars['u'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['u']->_loop = false; $_from = $_smarty_tpl->tpl_vars['flaggedUsers']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['u']->key => $_smarty_tpl->tpl_vars['u']->value) { $_smarty_tpl->tpl_vars['u']->_loop = true; ?> <div class="row"> <div class="col-md-3"> <a href="view_user.php?uid=<?php echo $_smarty_tpl->tpl_vars['u']->value['userid']; ?> "> <img src="<?php echo $_smarty_tpl->tpl_vars['userquery']->value->getUserThumb($_smarty_tpl->tpl_vars['u']->value, 'small'); ?> " class="oneUserImage" width="85" /> </a> </div> <div class="col-md-6"> (<?php echo $_smarty_tpl->tpl_vars['u']->value['email']; ?> ) <?php echo $_smarty_tpl->tpl_vars['u']->value['username']; ?> </div> <div class="col-md-7"> <label class="label label-danger">Last Active <?php echo niceTime($_smarty_tpl->tpl_vars['u']->value['last_active']); ?> </label> <label class="label label-primary"> <?php echo smarty_lang(array('code' => 'Flags'), $_smarty_tpl); ?> : <?php echo $_smarty_tpl->tpl_vars['u']->value['flag_type']; ?> </label> </div> </div> <?php } ?> <?php } ?> </div> </div> <div class="widget-main"> <hr> <table class="table table-stripped table-bordered"> <tr> <td> <div class="stats_subitem_d">Total Videos : <strong><?php ob_start(); echo get_videos(array('count_only' => 'yes'), $_smarty_tpl); echo number_format(ob_get_clean()); ?> </strong> </div> </td> <td> <div class="stats_subitem_d">Total Groups : <strong><?php echo get_groups(array('count_only' => 'yes'), $_smarty_tpl); ?> </strong> </div> </td> <td> <div class="stats_subitem_d">Total Collection : <strong><?php echo get_collections(array('count_only' => 'yes'), $_smarty_tpl); ?> </strong> </div> </td> <td> <div class="stats_subitem_d">Total Users : <strong><?php echo get_users(array('count_only' => 'yes'), $_smarty_tpl); ?> </strong> </div> </td> <td> <div class="stats_subitem_d">Total Photos: <strong><?php echo get_photos(array('count_only' => 'yes'), $_smarty_tpl); ?> </strong> </div> </td> </table> </div> </div> </div> </div> <div class="col-md-6"> <div class="widget-box"> <div class="widget-header header-color-red"> <h5><i class="glyphicon glyphicon-book"></i>ClipBucket News</h5> <div class="widget-toolbar"> <a href="#" data-action="collapse"> <i class="icon-chevron-down"></i> </a> <a href="#" data-action="close"> <i class="icon-remove"></i> </a> </div> </div> <div class="widget-body"> <div id="clipbucket_news" class="widget-main" style="height:419px;overflow:auto"> </div> </div> </div> </div> <hr> <!-- <div class="tabbable tabs-left" > --> <div class=" col-md-8 todotab" > <ul class="nav nav-tabs" id="myTab" > <li class="active"> <a data-toggle="tab" href="#todolist"> <h5><i class="glyphicon glyphicon-list-alt"></i> ToDo List</h5> </a> </li> <li class=""> <a data-toggle="tab" href="#pnotes"> <h5><i class="glyphicon glyphicon-pencil"></i> Personal Notes</h5> </a> </li> <li class=""> <a data-toggle="tab" href="#rcomments"> <h5><i class="glyphicon glyphicon-comment"></i> Recent Comments</h5> </a> </li> </ul> <div class="tab-content"> <div id="todolist" class="tab-pane active"> <div class="widgetBox"> <div class="addTodo paddingRightSmall paddingLeftLarge marginBottomLarge"> <div class="row"> <div class="from-group col-md-10"> <input type="text" name="addTodo" class="form-control"> </div> <div class="from-group relative"> <div class="addTodoButton"> <button id="addTodo" class="btn btn-primary btn-sm">Add</button> </div> </div> </div> </div> <?php if (isset($_smarty_tpl->tpl_vars['todos'])) { $_smarty_tpl->tpl_vars['todos'] = clone $_smarty_tpl->tpl_vars['todos']; $_smarty_tpl->tpl_vars['todos']->value = $_smarty_tpl->tpl_vars['myquery']->value->get_todos(); $_smarty_tpl->tpl_vars['todos']->nocache = null; $_smarty_tpl->tpl_vars['todos']->scope = 0; } else { $_smarty_tpl->tpl_vars['todos'] = new Smarty_variable($_smarty_tpl->tpl_vars['myquery']->value->get_todos(), null, 0); } ?> <ul class="row todosList" id="note-<?php echo $_smarty_tpl->tpl_vars['the_note']->value['note_id']; ?> " > <?php $_smarty_tpl->tpl_vars['note'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['note']->_loop = false; $_from = $_smarty_tpl->tpl_vars['todos']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['note']->key => $_smarty_tpl->tpl_vars['note']->value) { $_smarty_tpl->tpl_vars['note']->_loop = true; ?> <li class="col-md-12"> <div class="col-md-12"> <p class="oneTodo paddingLeftSmall col-md-10" id="<?php echo $_smarty_tpl->tpl_vars['note']->value['todo_id']; ?> "> <?php echo $_smarty_tpl->tpl_vars['note']->value['todo']; ?> </p> <a href="#" class="btn btn-danger btn-xs delete">Delete</a> </div> </li> <?php } ?> </ul> </div> </div> <div id="pnotes" class="tab-pane"> <div class="widgetBox"> <div class="addNote form-group paddingRightSmall"> <textarea class="form-control" name="ntoe" id="note"></textarea> <div class="alignRight marginTopSmall"> <a href="#" id="add_new_note" class="btn btn-primary btn-xs">Add a note</a> </div> </div> <?php if (isset($_smarty_tpl->tpl_vars['notes'])) { $_smarty_tpl->tpl_vars['notes'] = clone $_smarty_tpl->tpl_vars['notes']; $_smarty_tpl->tpl_vars['notes']->value = $_smarty_tpl->tpl_vars['myquery']->value->get_notes(); $_smarty_tpl->tpl_vars['notes']->nocache = null; $_smarty_tpl->tpl_vars['notes']->scope = 0; } else { $_smarty_tpl->tpl_vars['notes'] = new Smarty_variable($_smarty_tpl->tpl_vars['myquery']->value->get_notes(), null, 0); } ?> <ul class="notesList row paddingRightSmall" id="note-<?php echo $_smarty_tpl->tpl_vars['the_note']->value['note_id']; ?> " > <?php $_smarty_tpl->tpl_vars['note'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['note']->_loop = false; $_from = $_smarty_tpl->tpl_vars['notes']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['note']->key => $_smarty_tpl->tpl_vars['note']->value) { $_smarty_tpl->tpl_vars['note']->_loop = true; ?> <li class="col-md-4"> <div class=""> <p class="oneNote" id="<?php echo $_smarty_tpl->tpl_vars['note']->value['note_id']; ?> "> <?php echo $_smarty_tpl->tpl_vars['note']->value['note']; ?> <a href="#" class="delete">×</a> </p> </div> </li> <?php } ?> </ul> </div> </div> <div id="rcomments" class="tab-pane"> <div class="widget-box"> <div class="widget-header header-color-blue"> <h5>Recent Comments</h5> <div class="widget-toolbar"> <a href="#" data-action="collapse"> <i class="icon-chevron-down"></i> </a> <a href="#" data-action="close"> <i class="icon-remove"></i> </a> </div> </div> <div class="widget-body"> <div class="widget-main"> <div class="widget-box transparent"> <div class="widget-header widget-header-small"> </div> <div class="widget-body"> <div class="widget-body"> <div class="widget-main no-padding"> <div class="slimScrollDiv"> <?php if ($_smarty_tpl->tpl_vars['comments']->value) { ?> <?php $_smarty_tpl->tpl_vars['comment'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['comment']->_loop = false; $_from = $_smarty_tpl->tpl_vars['comments']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['comment']->key => $_smarty_tpl->tpl_vars['comment']->value) { $_smarty_tpl->tpl_vars['comment']->_loop = true; ?> <div class="itemdiv dialogdiv"> <?php $_smarty_tpl->tpl_vars['u'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['u']->_loop = false; $_from = $_smarty_tpl->tpl_vars['users']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['u']->key => $_smarty_tpl->tpl_vars['u']->value) { $_smarty_tpl->tpl_vars['u']->_loop = true; ?> <div class="user"> <img alt="Alexa's Avatar" src="<?php echo $_smarty_tpl->tpl_vars['userquery']->value->getUserThumb($_smarty_tpl->tpl_vars['u']->value, 'small'); ?> "> </div> <?php } ?> <div class="body"> <div class="time"> <i class="icon-time"></i> <span class="green"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['comment']->value['date_added']); ?> </span> </div> <div class="name"> <a href="#"><?php echo $_smarty_tpl->tpl_vars['comment']->value['anonym_name']; ?> </a> </div> <div class="text"><?php echo $_smarty_tpl->tpl_vars['comment']->value['comment']; ?> </div> <div class="tools"> <a href="#" class="btn btn-minier btn-info"> <i class="icon-only icon-share-alt"></i> </a> </div> </div> </div> <?php } ?> <?php } ?> </div> </div>/widget-main </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="well" style="margin-top: 14px;background:;border:1px solid rgba(128, 213, 255, 1);" > <h3>WHO WE ARE</h3> <p style="text-align:left;"><strong><a href="http://clip-bucket.com/" target="self">ClipBucket</a></strong> would not been possible without its team hardwork and determination for the betterment of the products quality and its services. We are proud that over _____ users are using worlds most popular open source video,audio and photo sharing script named <strong>ClipBucket</strong>. We are team who is determined to deliver the best features to the open source community. </p> <p style="text-align:left;margin-top:20px; "><strong>Clipbucket</strong> was made in the year 2006 with the idea to bring a better platform for organizations and companies interested in launching their own video,audio or photo sharing website. In every version our mission and goal is to simplify the technology by adopting new technological methods and techniques to cut down several frontend and backend issues faced. The idea is to give the user a chance to explore more with the flexibility of our product. We never compromise on our product interactivity. We always try to create a simple yet interactive and elegant design so that the user can have the best experience of the functions. With the improved social networking options like channels and groups. With ClipBucket’s unmatched quantifiability, users will stretch their applications from family videos to photo-albums. We started off as a paid product and later realized there is more power in going open-source and here we stand today <strong>#1</strong> video sharing and media management script in the industry.</p> <h3>OUR TEAM</h3> <p style="text-align:left;padding-bottom:20px;">However the team behind ClipBucket always kept their heads and nerves, though they faced many difficulties and problems in meeting the requirements. But team’s coordination and their creative techniques of solving issues and overcoming them with the best possible solution helped us in presenting Pakistan on international platform in the field of technology by bringing “Clip Bucket” A complete open source multimedia management script. </p> <div class="to_display"> <p>Founders <strong><a href="http://www.linkedin.com/profile/view?id=273050157" target="blank">Jahanzeb Hassan</a></strong> and <strong><a href="http://www.linkedin.com/profile/view?id=37419812" target="blank">Arslan Hassan</a></strong></p> <strong><a href="http://www.linkedin.com/profile/view?id=324544384" target="self">Fawaz Tahir</a></strong> - Web Application Team Lead<br> <strong><a href="http://www.linkedin.com/profile/view?id=78646794" target="self">Ruman Malik</a></strong> - Project Manager<br> <strong><a href="http://www.linkedin.com/profile/view?id=325944697" target="self">Muneeb</a></strong> - Mobile Application Team Lead<br> <strong><a href="http://www.linkedin.com/profile/view?id=324542682" target="self">Zomail</a></strong> - Sales and Support<br> <strong><a href="http://www.linkedin.com/profile/view?id=324542554" target="self">Shahzaib</a></strong> - Network Engineer<br> <strong><a href="http://www.linkedin.com/profile/view?id=324542025" target="self">Zunair</a></strong> - SEO and Publishing Manager<br> <br> <h5><strong>Kick-ass development team of <strong>ClipBucket</strong></strong></h5> <strong><a href="https://github.com/fahad-cb" target="self">Fahad Abbas</a></strong> - Project Head (Developer)<br> <strong><a href="https://github.com/imranhassan009" target="self">Imran Hassan</a></strong> - Web Developer<br> <strong><a href="https://github.com/shoaib-dev" target="self">Muhammad Shoaib</a></strong> - Web Services provider (Developer)<br> <strong><a href="https://github.com/awaistariq123" target="self">Awais Tariq</a></strong> - Video Converison Handler<br> <strong><a href="https://pk.linkedin.com/in/saqirzzq" target="self">Saaqib Razzaq</a></strong> - Web Developer<br> <strong><a href="https://github.com/jamilrehman" target="self">Jamil Rehman</a></strong> - Front end Developer (Head)<br> <strong><a href="https://github.com/rameez-anees" target="self">Rameez Anees</a></strong> - Front end Developer<br> <strong><a href="https://github.com/usman-des" target="self">Usman Afzal</a></strong> - Front end Developer<br> <strong><a href="https://github.com/epicPenguin" target="self">Muhammad Rizwan</a></strong> - Quality Assurance department<br><br><br> <h5><strong>We are from Pakistan with high heads and soft hearts</strong></h5> <p style="padding-bottom:20px;">Pakistan is always been in the news for the bad reasons and has been criticized by the rest of the world,even then the people of Pakistan are patriotic and stand united for the goodwill of their country.no matter how worst the situation gets the youth is eager enough to bring out the best in all the fields like media,communication, IT and science. IT industry is fast growing with a large potential and is regarded as a successful sector even in country’s worst financial crisis. as the IT industry in Pakistan is growing like wise the demand for the softwares and programmes has taken up a rapid growth. ClipBucket is one of the fastest and the most used media sharing script with all the latest features and enhancements in the social media. We as Pakistani feel proud on creating this product which will lead our country to the highest levels in the international market.</p> </div> <p><button id="addTodo" class="btn btn-primary btn-sm clip_read clip_hide" style="float:right;margin-right:10px;margin-top:-30px;">Read More</button></p> </div> <style type="text/css"> .to_display{ display: none; } .flot_chart1{ height: 200px; width: 400px; } .vids{ height: 250px; overflow-y: scroll; overflow-x: hidden; padding: 5px; } </style> <script type="text/javascript"> $( document ).ready(function() { $(".clip_read").click(function() { $(this).toggleClass('clip_hide'); if(!$(this).hasClass('clip_hide')) { $('.to_display').show(); $(".clip_read").text("Hide"); } else { $('.to_display').hide(); $(".clip_read").text("Read More"); } }); var baseurl="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> "; $.ajax({ // url: baseurl+'/ajax.php', url:baseurl+'/ajax.php', type: "POST", dataType : 'text', data: { mode: "get_news"}, success : function(news){ $('#clipbucket_news').html(news) }, timeout : 5000, error : function(err) { $('#clipbucket_news').html(' <div align="center"><em><strong>Connect with Internet to get News</strong></em></div>')}, }); }); $(function() { var options = { series: { bars: { show: true, steps: true, barWidth: 0.5, align: "center", }, points: { show: true }, lines: { show: true } }, xaxis: { mode: "categories", tickLength: 0 }, yaxis: { alignTicksWithAxis: false }, grid: { hoverable: true, clickable: true, labelMargin: 30, borderWidth: 0 } }; var ChartsWorker = function(options){ this.options = options; this.getUsersStatistics = function(callback){ var self = this; var ajaxCall = $.ajax({ url: "charts/reports/dashboard/get_users_data.php", type: "POST", data:"videos=videos", dataType: "json", success: function(data){ callback.call(self, data); }, error: function() { //alert('error'); }, }); }; this.getVideosStatistics = function(callback){ var self = this; var ajaxCall = $.ajax({ url: "charts/reports/dashboard/get_videos_data.php", type: "POST", data:"videos=videos", dataType: "json", success: function(data){ callback.call(self, data); }, error: function() { //alert('error'); }, }); }; this.getFlaggedStatistics = function(callback){ var self = this; var ajaxCall = $.ajax({ url: "charts/reports/dashboard/get_flagged_objects_data.php", type: "POST", data:"videos=videos", dataType: "json", success: function(data){ callback.call(self, data); }, error: function() { //alert('error'); }, }); }; this.getOverallStatistics = function(callback){ var self = this; var ajaxCall = $.ajax({ url: "charts/reports/dashboard/get_total_status_data.php", type: "POST", data:"videos=videos", dataType: "json", success: function(data){ callback.call(self, data); }, error: function() { //alert('error'); }, }); }; }; var chartsWorker = new ChartsWorker(options); chartsWorker.getUsersStatistics(function(data){ var today = data.today; var week = data.this_week; var month = data.this_month; $.plot("#nusers #weekly_users", [week] , this.options); $.plot("#nusers #monthly_users", [month] , this.options); $.plot("#nusers #daily_users", [today], this.options); }); chartsWorker.getVideosStatistics(function(data){ var today = data.today; var week = data.this_week; var month = data.this_month; $.plot("#mvideos #weekly_users", [week] , this.options); $.plot("#mvideos #monthly_users", [month] , this.options); $.plot("#mvideos #daily_users", [today], this.options); }); chartsWorker.getFlaggedStatistics(function(data){ var today = data.today; var week = data.this_week; var month = data.this_month; $.plot("#fobjects #weekly_users", [week] , this.options); $.plot("#fobjects #monthly_users", [month] , this.options); $.plot("#fobjects #daily_users", [today], this.options); }); chartsWorker.getOverallStatistics(function(data){ var today = data.today; var week = data.this_week; var month = data.this_month; $.plot("#statistics #weekly_stats", [week] , this.options); $.plot("#statistics #monthly_stats", [month] , this.options); $.plot("#statistics #daily_stats", [today], this.options); }); // $.plot("#placeholder", data, options); var iteration = 0; function showTooltip(x, y, contents) { $('<div id="tooltip">' + contents + '</div>').css( { position: 'absolute', display: 'none', top: y + 5, left: x + 5, border: '1px solid #fdd', padding: '2px', 'background-color': '#fee', opacity: 0.80 }).appendTo("body").fadeIn(200); } var previousPoint = null; function tooltip(chart_id,tooltip_id){ $(chart_id).bind("plothover", function (event, pos, item) { $("#x").text(pos.x.toFixed(2)); $("#y").text(pos.y.toFixed(2)); if ($(tooltip_id).is(':checked')) { if (item) { if (previousPoint != item.dataIndex) { previousPoint = item.dataIndex; $("#tooltip").remove(); var x = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2); showTooltip(item.pageX, item.pageY, item.series.label + " = " + y); } } else { $("#tooltip").remove(); previousPoint = null; } } }); } var page = '<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /admin_area/index.php'; $(".oneNote .delete").on({ click: function(e){ e.preventDefault(); var noteId = $(this).parent().attr("id"); delete_note(noteId); $(this).parents("li").remove(); } }); $("#add_new_note").on({ click: function(e){ e.preventDefault(); var self = this; var note = $(this).parents(".widgetBox").find("textarea").val(); if(!note){ alert("Please enter something"); } else{ $(this).parents(".widgetBox").find("textarea").val(""); $.post(page, { mode : 'add_note', note : note, },function(data) { console.log(data); var li = document.createElement("li"); li.className = "col-md-4"; var a = document.createElement("a"); a.className = "delete"; a.href = "#"; a.innerHTML = "x"; var p = document.createElement("p"); p.id = data.id; p.innerHTML = note; p.className = "oneNote"; $(p).append(a); $(li).append(p); $(a).on({ click: function(e){ e.preventDefault(); var noteId = $(this).parent().attr("id"); delete_note(noteId); $(this).parents("li").remove(); } }); $(self).parents(".widgetBox").find("ul").prepend(li); },'json'); } } }); $("#addTodo").on({ click: function(e){ e.preventDefault(); var self = this; var newVal = $(this).parents(".addTodo").find("input").val(); if(newVal.length){ $(this).parents(".addTodo").find("input").val(""); var ajaxCall = $.ajax({ url: page, type: "post", data: { val: newVal, mode: "add_todo", }, }); ajaxCall.success(function(data){ data = $.parseJSON(data); var li = document.createElement("li"); li.className = "col-md-12"; var p = document.createElement("p"); p.className = "oneTodo paddingLeftSmall col-md-10"; p.id = data.id; p.innerHTML = data.todo; var a = document.createElement("a"); a.href = "#"; a.className = "col-md-2 btn btn-danger btn-xs delete"; a.innerHTML = "Delete"; $(a).on("click", function(e){ e.preventDefault(); var self = this; var id = $(this).prev().attr("id"); var ajaxCall = $.ajax({ url: page, type: "post", data: { id: id, mode: "delete_todo", }, }); ajaxCall.success(function(data){ $(self).parents("li").remove(); }); }); var div = document.createElement("div"); div.className = "col-md-12"; $(li).append(div).find("div").append(p).append(a); $(self).parents(".widgetBox").find("ul").prepend(li); }); }else{ alert("Please enter a valid value"); } } }); $("#todolist .delete").on("click", function(e){ e.preventDefault(); var self = this; var id = $(this).prev().attr("id"); var ajaxCall = $.ajax({ url: page, type: "post", data: { id: id, mode: "delete_todo", }, }); ajaxCall.success(function(data){ $(self).parents("li").remove(); }); }); }); </script> <?php }
function content_56afd7a7b66b49_76302993($_smarty_tpl) { if (!is_callable('smarty_modifier_date_format')) { include '/var/www/html/includes/smartyv3/plugins/modifier.date_format.php'; } if (!is_callable('smarty_modifier_truncate')) { include '/var/www/html/includes/smartyv3/plugins/modifier.truncate.php'; } ?> <div class="row message"> <div class="row accountprofile"> <div class="col-md-10"> <div class="media"> <a class="pull-left" href="#"> <img class="media-object imgobject" src="<?php echo $_smarty_tpl->tpl_vars['userquery']->value->getUserThumb($_smarty_tpl->tpl_vars['user']->value); ?> " width="142" alt="..."> </a> <div class="media-body"> <div class="row"> <div class="col-md-6 procolor"> <h4 class="media-heading headcolor"><?php echo $_smarty_tpl->tpl_vars['user']->value['username']; ?> (<?php if (isset($_smarty_tpl->tpl_vars['category'])) { $_smarty_tpl->tpl_vars['category'] = clone $_smarty_tpl->tpl_vars['category']; $_smarty_tpl->tpl_vars['category']->value = $_smarty_tpl->tpl_vars['userquery']->value->get_category($_smarty_tpl->tpl_vars['user']->value['category']); $_smarty_tpl->tpl_vars['category']->nocache = null; $_smarty_tpl->tpl_vars['category']->scope = 0; } else { $_smarty_tpl->tpl_vars['category'] = new Smarty_variable($_smarty_tpl->tpl_vars['userquery']->value->get_category($_smarty_tpl->tpl_vars['user']->value['category']), null, 0); } ?> <?php echo $_smarty_tpl->tpl_vars['category']->value['category_name']; ?> )</h4> <b><?php echo smarty_lang(array('code' => 'Since:'), $_smarty_tpl); ?> </b> (<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['user']->value['doj']); ?> ) <b><?php echo smarty_lang(array('code' => 'last Login:'******'user']->value['last_logged']); ?> ) </div> <!--<div class="col-md-4 procolor">--> <!--(<?php if (isset($_smarty_tpl->tpl_vars['category'])) { $_smarty_tpl->tpl_vars['category'] = clone $_smarty_tpl->tpl_vars['category']; $_smarty_tpl->tpl_vars['category']->value = $_smarty_tpl->tpl_vars['userquery']->value->get_category($_smarty_tpl->tpl_vars['user']->value['category']); $_smarty_tpl->tpl_vars['category']->nocache = null; $_smarty_tpl->tpl_vars['category']->scope = 0; } else { $_smarty_tpl->tpl_vars['category'] = new Smarty_variable($_smarty_tpl->tpl_vars['userquery']->value->get_category($_smarty_tpl->tpl_vars['user']->value['category']), null, 0); } ?> --> <!--<?php echo $_smarty_tpl->tpl_vars['category']->value['category_name']; ?> )<br>--> <!--<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['user']->value['doj']); ?> <br>--> <!--<?php echo nicetime($_smarty_tpl->tpl_vars['user']->value['last_logged']); ?> --> <!--</div>--> </div> </div> </div> </div> <!--<div class="row">--> <!--<div class="col-md-6">--> <!--<?php echo smarty_lang(array('code' => 'username:'******'code' => 'joined:'), $_smarty_tpl); ?> <br>--> <!--<?php echo smarty_lang(array('code' => 'last logged in:'), $_smarty_tpl); ?> <br>--> <!--<?php echo smarty_lang(array('code' => 'category:'), $_smarty_tpl); ?> <br>--> <!--</div>--> <!--<div class="col-md-6">--> <!--<?php echo $_smarty_tpl->tpl_vars['user']->value['username']; ?> <br>--> <!--<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['user']->value['doj']); ?> <br>--> <!--<?php echo nicetime($_smarty_tpl->tpl_vars['user']->value['last_logged']); ?> <br>--> <!--<?php if (isset($_smarty_tpl->tpl_vars['category'])) { $_smarty_tpl->tpl_vars['category'] = clone $_smarty_tpl->tpl_vars['category']; $_smarty_tpl->tpl_vars['category']->value = $_smarty_tpl->tpl_vars['userquery']->value->get_category($_smarty_tpl->tpl_vars['user']->value['category']); $_smarty_tpl->tpl_vars['category']->nocache = null; $_smarty_tpl->tpl_vars['category']->scope = 0; } else { $_smarty_tpl->tpl_vars['category'] = new Smarty_variable($_smarty_tpl->tpl_vars['userquery']->value->get_category($_smarty_tpl->tpl_vars['user']->value['category']), null, 0); } ?> --> <!--<?php echo $_smarty_tpl->tpl_vars['category']->value['category_name']; ?> --> <!--</div>--> <!--</div>--> </div> </div> <hr class="newhr1"> <div class="mvideo accountprofile"> <span class="lead"> <?php echo smarty_lang(array('code' => 'Latest Videos'), $_smarty_tpl); ?> </span> <table class="table table-bordered table-striped manageUsersTable"> <tr> <td><i class="icon-facetime-video"></i> Videos Details</td> <td>Option</td> </tr> <?php if ($_smarty_tpl->tpl_vars['videos']->value) { ?> <?php $_smarty_tpl->tpl_vars['video'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['video']->_loop = false; $_from = $_smarty_tpl->tpl_vars['videos']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['video']->key => $_smarty_tpl->tpl_vars['video']->value) { $_smarty_tpl->tpl_vars['video']->_loop = true; ?> <tr> <td> <div class="row"> <div class="col-md-10"> <div class="row"> <div class="col-md-3"> <a href="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /edit_video.php?vid=<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> "> <img src="<?php echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video']->value), $_smarty_tpl); ?> " width="130" height="80" id="thumbs_<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> " class="vthumb" title=""/> <span class="duration">(<?php if ($_smarty_tpl->tpl_vars['video']->value['duration'] > 1) { echo SetTime($_smarty_tpl->tpl_vars['video']->value['duration']); } else { ?> 00:00<?php } ?> )</span> </a> </div> <div class="col-md-9"> <a href="edit_video.php?vid=<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> "> <?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video']->value['title'], 80); ?> </a><br> <span class="maccountlabels"> <strong><?php echo niceTime($_smarty_tpl->tpl_vars['video']->value['date_added']); ?> </strong> <?php echo smarty_lang(array('code' => 'views'), $_smarty_tpl); ?> : <strong><?php echo number_format($_smarty_tpl->tpl_vars['video']->value['views']); ?> </strong></span> <div class="labels"> <?php if ($_smarty_tpl->tpl_vars['video']->value['featured'] == 'yes') { ?> <span class="label label-primary">Featured<?php } else { } ?> </span> <span class="label <?php if ($_smarty_tpl->tpl_vars['video']->value['active'] == 'yes') { ?> label-success<?php } else { ?> label-warning<?php } ?> mlabel"> <?php if ($_smarty_tpl->tpl_vars['video']->value['active'] == 'yes') { ?> Active<?php } else { ?> InActive<?php } ?> </span> <span class="label <?php if ($_smarty_tpl->tpl_vars['video']->value['status'] == 'Successful') { ?> label-success<?php } else { ?> label-warning<?php } ?> "> <?php if ($_smarty_tpl->tpl_vars['video']->value['status'] == 'Successful') { ?> Successful<?php } else { ?> Processing<?php } ?> </span> <span class="label label-info"> Viewed <?php echo niceTime($_smarty_tpl->tpl_vars['video']->value['last_viewed']); ?> </span> </div> </div> </div> </div> <div class="col-md-2"> <div class="row"> <?php if ($_smarty_tpl->tpl_vars['video']->value['broadcast'] == 'public') { ?> <div class="col-md-1"><i class="icon-globe"></i></div> <?php } elseif ($_smarty_tpl->tpl_vars['video']->value['broadcast'] != 'public') { ?> <div class="col-md-1"><i class="icon-lock"></i></div> <?php } ?> </div> <a href="view_user.php?uid=<?php echo $_smarty_tpl->tpl_vars['video']->value['userid']; ?> "><?php echo $_smarty_tpl->tpl_vars['video']->value['username']; ?> </a> </div> </div> </td> <td> <div class="dropdown"> <button id="dropdownMenu1" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown"> Actions <i class="caret"></i></button> <ul class="dropdown-menu pull-right" aria-labelledby="dropdownMenu1" role="menu"> <li><a role="menuitem" tabindex="-1" href="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /edit_video.php?vid=<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> " class="">Edit</a></li> <li><a role="menuitem" tabindex="-1" href="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /watch_video.php?v=<?php echo $_smarty_tpl->tpl_vars['video']->value['videokey']; ?> "target="_blank">Watch</a> <li class="divider"></li> <li><a role="menuitem" tabindex="-1" href="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /myaccount.php?delete_video=<?php echo $_smarty_tpl->tpl_vars['video']->value['videoid']; ?> ">Delete</a> </li> <?php $_smarty_tpl->tpl_vars['links'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['links']->_loop = false; $_from = $_smarty_tpl->tpl_vars['cbvid']->value->video_manager_links; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['links']->key => $_smarty_tpl->tpl_vars['links']->value) { $_smarty_tpl->tpl_vars['links']->_loop = true; ?> <?php echo $_smarty_tpl->tpl_vars['cbvid']->value->video_manager_link($_smarty_tpl->tpl_vars['links']->value, $_smarty_tpl->tpl_vars['video']->value); ?> <?php } ?> </ul> </div> </td> </tr> <?php } ?> </table> <?php } else { ?> <div align="center"><strong><em>No Video Found</em></strong></div> <?php } ?> </div> <div class="flaggedtable accountprofile1"> <table class="table table-bordered table-striped"> <div id="fobjects" class="tab-pane" > <div class="widget-box"> <td> <div class="widget-header"> <h5><i class="glyphicon glyphicon-flag"></i>Flagged Objects</h5> </div> <div class="widget-body"> <div class="tabbable tabs-left"> <ul class="nav nav-tabs" id="myTab"> <li class="active"> <a data-toggle="tab" href="#fvideos">Videos</a> </li> <li class="photos"> <a data-toggle="tab" href="#fphotos">Photos</a> </li> </ul> <br> <div class="tab-content"> <div id="fvideos" class="tab-pane active"> <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['list'])) { unset($_smarty_tpl->tpl_vars['smarty']->value['section']['list']); } $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['name'] = 'list'; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['loop'] = is_array($_loop = $_smarty_tpl->tpl_vars['flagedVideos']->value) ? count($_loop) : max(0, (int) $_loop); unset($_loop); $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['show'] = true; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['loop']; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['step'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['loop'] - 1; if ($_smarty_tpl->tpl_vars['smarty']->value['section']['list']['show']) { $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['loop']; if ($_smarty_tpl->tpl_vars['smarty']->value['section']['list']['total'] == 0) { $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['show'] = false; } } else { $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['total'] = 0; } if ($_smarty_tpl->tpl_vars['smarty']->value['section']['list']['show']) { for ($_smarty_tpl->tpl_vars['smarty']->value['section']['list']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['iteration'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['total']; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['iteration']++) { $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['iteration']; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['step']; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['step']; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['first'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['iteration'] == 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['last'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['total']; ?> <div class="row"> <div class="col-md-3"> <img src="<?php echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['flagedVideos']->value[$_smarty_tpl->getVariable('smarty')->value['section']['list']['index']]), $_smarty_tpl); ?> " width="85" height="70" id="thumbs_<?php echo $_smarty_tpl->tpl_vars['flagedVideos']->value[$_smarty_tpl->getVariable('smarty')->value['section']['list']['index']]['videoid']; ?> " title=""/> </div> <div class="col-md-6 fvideos"> <?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['flagedVideos']->value[$_smarty_tpl->getVariable('smarty')->value['section']['list']['index']]['title'], 50); ?> </div> <div class="col-md-7 fvideos"> <label class="label label-danger">Uploaded <?php echo niceTime($_smarty_tpl->tpl_vars['flagedVideos']->value[$_smarty_tpl->getVariable('smarty')->value['section']['list']['index']]['date_added']); ?> </label> <label class="label label-default"> <?php echo smarty_lang(array('code' => 'views'), $_smarty_tpl); ?> : <?php echo number_format($_smarty_tpl->tpl_vars['flagedVideos']->value['views']); ?> </label> <label class="label label-primary"> Flags:<?php echo $_smarty_tpl->tpl_vars['flagedVideos']->value[$_smarty_tpl->getVariable('smarty')->value['section']['list']['index']]['total_flags']; ?> </label> </div> </div> <hr class="newhr"> <?php } } ?> </div> <div id="fphotos" class="tab-pane"> <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['list'])) { unset($_smarty_tpl->tpl_vars['smarty']->value['section']['list']); } $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['name'] = 'list'; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['loop'] = is_array($_loop = $_smarty_tpl->tpl_vars['flagedPhotos']->value) ? count($_loop) : max(0, (int) $_loop); unset($_loop); $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['show'] = true; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['loop']; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['step'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['loop'] - 1; if ($_smarty_tpl->tpl_vars['smarty']->value['section']['list']['show']) { $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['loop']; if ($_smarty_tpl->tpl_vars['smarty']->value['section']['list']['total'] == 0) { $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['show'] = false; } } else { $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['total'] = 0; } if ($_smarty_tpl->tpl_vars['smarty']->value['section']['list']['show']) { for ($_smarty_tpl->tpl_vars['smarty']->value['section']['list']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['iteration'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['total']; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['iteration']++) { $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['iteration']; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['step']; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['step']; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['first'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['iteration'] == 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['last'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['list']['total']; ?> <div class="row"> <div class="col-md-3"> <img src="<?php echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['flagedPhotos']->value[$_smarty_tpl->getVariable('smarty')->value['section']['list']['index']]), $_smarty_tpl); ?> " width="85" height="70" id="thumbs_<?php echo $_smarty_tpl->tpl_vars['flagedPhotos']->value[$_smarty_tpl->getVariable('smarty')->value['section']['list']['index']]['photoid']; ?> " title=""/> </div> <div class="col-md-6 fusers"> <?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['flagedphotos']->value[$_smarty_tpl->getVariable('smarty')->value['section']['list']['index']]['title'], 50); ?> </div> <div class="col-md-2"> <strong class="btn btn-primary btn-xs pull-right"> Flags:<?php echo $_smarty_tpl->tpl_vars['flagedPhotos']->value[$_smarty_tpl->getVariable('smarty')->value['section']['list']['index']]['total_flags']; ?> </strong> </div> <div class="col-md-7 fusers"> <label class="label label-danger">Uploaded <?php echo niceTime($_smarty_tpl->tpl_vars['flagedPhotos']->value[$_smarty_tpl->getVariable('smarty')->value['section']['list']['index']]['date_added']); ?> </label> <label class="label label-default"> <?php echo smarty_lang(array('code' => 'views'), $_smarty_tpl); ?> : <?php echo number_format($_smarty_tpl->tpl_vars['flagedPhotos']->value['views']); ?> </label> </div> </div> <?php } } ?> </div> </div> </div> <!-- /widget-main --> </div><!-- /widget-body --> </div> </div> </table> </div> <div class="col-md-12"> <div class="padding38"> <?php if ($_smarty_tpl->tpl_vars['user']->value['userid'] == userid()) { ?> <button class="btn btn-primary new1" style="background-color: #000000;color: white"> <span class="line-height-1 bigger-170 blue"><?php echo $_smarty_tpl->tpl_vars['user']->value['total_videos']; ?> </span> <br> <span class="line-height-1 smaller-90 new1"> <?php echo smarty_lang(array('code' => 'Videos'), $_smarty_tpl); ?> </span> </button> <span class="btn btn-primary new1" style="background-color: #000000;color: #ffffff"> <span class="line-height-1 bigger-170 blue"><?php echo $_smarty_tpl->tpl_vars['user']->value['total_photos']; ?> </span> <br> <span class="line-height-1 smaller-90 new1"> Photos </span> </span> <span class="btn btn-primary new1" style="background-color: #000000;color: #ffffff"> <span class="line-height-1 bigger-170 blue"><?php echo number_format($_smarty_tpl->tpl_vars['user']->value['num_visits']); ?> </span> <br> <span class="line-height-1 smaller-90 new1"> <?php echo smarty_lang(array('code' => 'total_logins'), $_smarty_tpl); ?> </span> </span> <span class="btn btn-primary new1" style="background-color: #000000;color: #ffffff"> <span class="line-height-1 bigger-170 blue"><?php echo number_format($_smarty_tpl->tpl_vars['user']->value['total_watched']); ?> </span> <br> <span class="line-height-1 smaller-90 new1"> <?php echo smarty_lang(array('code' => 'Watched'), $_smarty_tpl); ?> </span> </span> <span class="btn btn-primary new1" style="background-color: #000000;color: #ffffff"> <span class="line-height-1 bigger-170 blue"><?php echo number_format($_smarty_tpl->tpl_vars['user']->value['total_comments']); ?> </span> <br> <span class="line-height-1 smaller-90 new1"> <?php echo smarty_lang(array('code' => 'Comments'), $_smarty_tpl); ?> </span> </span> <span class="btn btn-primary new1" style="background-color: #000000;color: #ffffff"> <span class="line-height-1 bigger-170 blue"><?php echo number_format($_smarty_tpl->tpl_vars['user']->value['total_collections']); ?> </span> <br> <span class="line-height-1 smaller-90 new1"> <?php echo smarty_lang(array('code' => 'Collections'), $_smarty_tpl); ?> </span> </span> <span class="btn btn-primary new1" style="background-color: #000000; color: #ffffff"> <span class="line-height-1 bigger-170 blue"><?php echo $_smarty_tpl->tpl_vars['user']->value['profile_hits']; ?> </span> <br> <span class="line-height-1 smaller-90 new1"> <?php echo smarty_lang(array('code' => 'Views'), $_smarty_tpl); ?> </span> </span> <span class="btn btn-primary new1" style="background-color: #000000;color: #ffffff"> <span class="line-height-1 bigger-170 blue"><?php echo $_smarty_tpl->tpl_vars['user']->value['subscribers']; ?> </span> <br> <span class="line-height-1 smaller-90 new1"> <?php echo smarty_lang(array('code' => 'Subscribers'), $_smarty_tpl); ?> </span> </span> <?php } ?> </div> </div><?php }
function relativeDate($date) { $diff = time() - strtotime($date); if ($diff < 5) { return 'just now'; } if ($diff < 60) { return niceTime($diff, 'second'); } $diff = round($diff / 60); if ($diff < 60) { return niceTime($diff, 'minute'); } $diff = round($diff / 60); if ($diff < 24) { return niceTime($diff, 'hour'); } $diff = round($diff / 24); if ($diff < 7) { return niceTime($diff, 'day'); } $diff = round($diff / 7); if ($diff < 4) { return niceTime($diff, 'week'); } return 'on ' . date('jS F Y', strtotime($date)); }
function content_56afda72c37094_74986900($_smarty_tpl) { if (isset($_smarty_tpl->tpl_vars['video'])) { $_smarty_tpl->tpl_vars['video'] = clone $_smarty_tpl->tpl_vars['video']; $_smarty_tpl->tpl_vars['video']->value = $_smarty_tpl->tpl_vars['vdo']->value; $_smarty_tpl->tpl_vars['video']->nocache = null; $_smarty_tpl->tpl_vars['video']->scope = 0; } else { $_smarty_tpl->tpl_vars['video'] = new Smarty_variable($_smarty_tpl->tpl_vars['vdo']->value, null, 0); } if (isset($_smarty_tpl->tpl_vars['type'])) { $_smarty_tpl->tpl_vars['type'] = clone $_smarty_tpl->tpl_vars['type']; $_smarty_tpl->tpl_vars['type']->value = 'video'; $_smarty_tpl->tpl_vars['type']->nocache = null; $_smarty_tpl->tpl_vars['type']->scope = 0; } else { $_smarty_tpl->tpl_vars['type'] = new Smarty_variable('video', null, 0); } ?> <div class="container"> <div class="row"> <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 html5_player_enlarge nopadding-right "> <div class="cb-box pad-bottom-sm"> <div id="cb_player" class="no-pad cb_player"> <?php echo flashPlayer(array('vdetails' => $_smarty_tpl->tpl_vars['video']->value, 'width' => '100%', 'height' => '100%'), $_smarty_tpl); ?> </div> <!-- cb_player end --> <div class="watch-vid-title mbm"> <h1><?php echo $_smarty_tpl->tpl_vars['video']->value['title']; ?> </h1> </div> <div class="vid-detail-sec"> <div class="watch-vid-thumb"> <img src="<?php echo $_smarty_tpl->tpl_vars['userquery']->value->avatar($_smarty_tpl->tpl_vars['video']->value); ?> " class="img-circle"/> </div> <div class="watch-vid-user-sec"> <div class="watch-vid-user-name mtm"> <a href="<?php echo $_smarty_tpl->tpl_vars['userquery']->value->profile_link($_smarty_tpl->tpl_vars['video']->value); ?> "> <?php echo $_smarty_tpl->tpl_vars['video']->value['username']; ?> </a> </div> <?php if ($_smarty_tpl->tpl_vars['video']->value['userid'] != userid()) { ?> <a id="subscribeUser" class="btn btn-xs btn-primary" href="javascript:void(0)"> <?php echo lang('Subscribe'); ?> </a><?php } ?> </div> <div class="watch-vid-rating-sec"> <div class="watch-vid-rating-view"> <?php echo number_format($_smarty_tpl->tpl_vars['vdo']->value['views']); ?> <span class="small font18"><?php echo lang('View'); if ($_smarty_tpl->tpl_vars['vdo']->value['views'] > 1) { echo lang('s'); } ?> </span> </div> <div class="watch-vid-thumbsupdown-sec" id="rating_container"> <?php echo show_video_rating(array('rating' => $_smarty_tpl->tpl_vars['vdo']->value['rating'], 'ratings' => $_smarty_tpl->tpl_vars['vdo']->value['rated_by'], 'total' => '10', 'id' => $_smarty_tpl->tpl_vars['vdo']->value['videoid'], 'type' => 'video'), $_smarty_tpl); ?> </div> </div> </div> <!-- vid-detail-sec end --> <div class="cb-item-desc-container clearfix grey-tabs"> <ul class="nav nav-tabs"> <li class="active"> <a href="#cb-item-info" data-toggle="tab"><i class="fa fa-info"></i> <?php echo lang('Info'); ?> </a> </li> <li> <a href="#cb-item-share" data-toggle="tab"><i class="fa fa-share-square-o"></i> <?php echo lang('Share'); ?> </a> </li> <li> <a href="#cb-item-addto" data-toggle="tab"><i class="fa fa-plus"></i> <?php echo lang('Add to'); ?> </a> </li> <li> <a id="reportVideo" href="#cb-item-report" data-toggle="tab"><i class="fa fa-flag"></i> <?php echo lang('Report'); ?> </a> </li> </ul> <div class="tab-content"> <div class="tab-pane active" id="cb-item-info"> <div class="col-lg-9 col-md-9 col-sm-9 col-xs-7 no-padding"> <p><?php echo description(description($_smarty_tpl->tpl_vars['video']->value['description'])); ?> </p> <div class="watch-vid-tag"> <strong ><?php echo lang('Category:'); ?> </strong> <span ><?php echo categories($_smarty_tpl->tpl_vars['vdo']->value['category'], 'video'); ?> </span> </div> <div class="watch-vid-tag"> <strong ><?php echo lang('Tags:'); ?> </strong> <span ><?php echo tags($_smarty_tpl->tpl_vars['vdo']->value['tags'], 'videos'); ?> </span> </div> <div class="watch-vid-tag"> <strong >Published: </strong> <span ><?php echo niceTime($_smarty_tpl->tpl_vars['video']->value['date_added']); ?> </span> </div> <!-- view sec hide on told arslan bhai --> <!-- <div class="mtm"> <strong><?php echo smarty_lang(array('code' => 'views'), $_smarty_tpl); ?> </strong> : <?php echo number_format($_smarty_tpl->tpl_vars['vdo']->value['views']); ?> – <strong><?php echo smarty_lang(array('code' => 'duration'), $_smarty_tpl); ?> </strong> : <?php echo SetTime($_smarty_tpl->tpl_vars['vdo']->value['duration']); ?> – <strong><?php echo smarty_lang(array('code' => 'comments'), $_smarty_tpl); ?> </strong> : <?php echo number_format($_smarty_tpl->tpl_vars['vdo']->value['comments_count']); ?> </div> --> </div> <div class="col-lg-3 col-md-3 col-sm-3 col-xs-5 no-padding" style="margin-top:25px;"> <div class="watch-vid-social-sec col-lg-12 pull-right no-padding"> <a class="cb-item-social-icon twitter" href="https://twitter.com/share" target="_blank"> <i class="fa fa-twitter"></i> </a> <a class="cb-item-social-icon googlep" href="https://plus.google.com/share?url=<?php echo urlencode(videolink($_smarty_tpl->tpl_vars['video']->value)); ?> " target="_blank"> <i class="fa fa-google-plus"></i> </a> <a class="cb-item-social-icon facebook" href="http://www.facebook.com/sharer/sharer.php?s=100&p[url]=<?php echo urlencode(videoLink($_smarty_tpl->tpl_vars['video']->value)); ?> &p[images][0]=<?php echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video']->value), $_smarty_tpl); ?> &p[title]=<?php echo urlencode(title($_smarty_tpl->tpl_vars['video']->value['title'])); ?> &p[summary]=<?php echo urlencode(description($_smarty_tpl->tpl_vars['video']->value['description'])); ?> " target="_blank"> <i class="fa fa-facebook"></i> </a> </div> <?php if ($_smarty_tpl->tpl_vars['Cbucket']->value->configs['video_download'] == 1 && $_smarty_tpl->tpl_vars['cbvid']->value->downloadable($_smarty_tpl->tpl_vars['vdo']->value)) { ?> <div class="dropdown col-lg-12 pull-right no-padding text-right"> <button class="btn btn-success dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true" style="margin-top: 10px;"> Download <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1"> <?php if (isset($_smarty_tpl->tpl_vars['files'])) { $_smarty_tpl->tpl_vars['files'] = clone $_smarty_tpl->tpl_vars['files']; $_smarty_tpl->tpl_vars['files']->value = get_video_files($_smarty_tpl->tpl_vars['vdo']->value, true, true); $_smarty_tpl->tpl_vars['files']->nocache = null; $_smarty_tpl->tpl_vars['files']->scope = 0; } else { $_smarty_tpl->tpl_vars['files'] = new Smarty_variable(get_video_files($_smarty_tpl->tpl_vars['vdo']->value, true, true), null, 0); } ?> <?php $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['file']->_loop = false; $_from = $_smarty_tpl->tpl_vars['files']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['file']->key => $_smarty_tpl->tpl_vars['file']->value) { $_smarty_tpl->tpl_vars['file']->_loop = true; ?> <?php if (isset($_smarty_tpl->tpl_vars['quality'])) { $_smarty_tpl->tpl_vars['quality'] = clone $_smarty_tpl->tpl_vars['quality']; $_smarty_tpl->tpl_vars['quality']->value = explode('-', $_smarty_tpl->tpl_vars['file']->value); $_smarty_tpl->tpl_vars['quality']->nocache = null; $_smarty_tpl->tpl_vars['quality']->scope = 0; } else { $_smarty_tpl->tpl_vars['quality'] = new Smarty_variable(explode('-', $_smarty_tpl->tpl_vars['file']->value), null, 0); } ?> <?php if (isset($_smarty_tpl->tpl_vars['quality'])) { $_smarty_tpl->tpl_vars['quality'] = clone $_smarty_tpl->tpl_vars['quality']; $_smarty_tpl->tpl_vars['quality']->value = explode('.', $_smarty_tpl->tpl_vars['quality']->value[1]); $_smarty_tpl->tpl_vars['quality']->nocache = null; $_smarty_tpl->tpl_vars['quality']->scope = 0; } else { $_smarty_tpl->tpl_vars['quality'] = new Smarty_variable(explode('.', $_smarty_tpl->tpl_vars['quality']->value[1]), null, 0); } ?> <?php if (isset($_smarty_tpl->tpl_vars['file_quality'])) { $_smarty_tpl->tpl_vars['file_quality'] = clone $_smarty_tpl->tpl_vars['file_quality']; $_smarty_tpl->tpl_vars['file_quality']->value = $_smarty_tpl->tpl_vars['quality']->value[0]; $_smarty_tpl->tpl_vars['file_quality']->nocache = null; $_smarty_tpl->tpl_vars['file_quality']->scope = 0; } else { $_smarty_tpl->tpl_vars['file_quality'] = new Smarty_variable($_smarty_tpl->tpl_vars['quality']->value[0], null, 0); } ?> <li role="presentation"> <a role="menuitem" tabindex="-1" href="<?php echo $_smarty_tpl->tpl_vars['file']->value; ?> " download> <span class="glyphicon glyphicon-download-alt"></span><?php echo $_smarty_tpl->tpl_vars['file_quality']->value; ?> </a> </li> <?php } ?> </ul> </div> <?php } ?> </div> <br> </div> <div class="tab-pane" id="cb-item-share"> <?php echo show_share_form(array('id' => $_smarty_tpl->tpl_vars['vdo']->value['videoid'], 'type' => 'video'), $_smarty_tpl); ?> </div> <div class="tab-pane" id="cb-item-addto"> <div class="clearfix visible-xs-block" style="margin-bottom:25px;"> <div id="video_action_result_cont" style="display:none;"></div> <a class="btn mtm btn-block btn-primary" href="javascript:void(0)" onclick="add_to_fav('video','<?php echo $_smarty_tpl->tpl_vars['vdo']->value['videoid']; ?> ');" style="color:white;">Add to My Favorites</a> </div> <div class="alert "> <?php echo show_playlist_form(array('id' => $_smarty_tpl->tpl_vars['vdo']->value['videoid'], 'type' => 'video'), $_smarty_tpl); ?> </div> <?php if (userid()) { ?> <div class="alert "> <div class="clearfix"></div> <div align="right"><a href="javascript:void(0)" onclick="$('#addCollectionCont').toggle()" style="text-decoration:none"><strong>+ <?php echo smarty_lang(array('code' => 'add_to_my_collection'), $_smarty_tpl); ?> </strong></a> </div> <div id="addCollectionCont" style="display:none"><?php echo show_collection_form(array('id' => $_smarty_tpl->tpl_vars['vdo']->value['videoid'], 'type' => 'Video'), $_smarty_tpl); ?> </div> </div> <?php } ?> </div> <div class="tab-pane" id="cb-item-report"> <?php echo show_flag_form(array('id' => $_smarty_tpl->tpl_vars['vdo']->value['videoid'], 'type' => 'video'), $_smarty_tpl); ?> </div> </div> </div> <div id="messageFav" class="alert alert-info marginTop" style="display:none"></div> <div id="test1"></div> <div id="reply" class="clearfix"> <div class="pad-bottom"> <div class="addComment clearfix"> <div class="com_count" id="com_count"><span><?php echo smarty_lang(array('code' => 'comments'), $_smarty_tpl); ?> </span> <?php echo $_smarty_tpl->tpl_vars['vdo']->value['comments_count']; ?> </div> <?php if ($_smarty_tpl->tpl_vars['myquery']->value->is_commentable($_smarty_tpl->tpl_vars['vdo']->value, 'v')) { ?> <?php echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/comments/add_comment.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['vdo']->value['videoid'], 'type' => 'v'), 0); ?> <?php } else { ?> <div class="alert alert-warning"><?php echo smarty_lang(array('code' => 'comm_disabled_for_vid'), $_smarty_tpl); ?> </div> <?php } ?> </div> <div id="userCommentsList"> </div> </div> </div> </div> </div> <!--Side bar start--> <div class="col-lg-4 col-md-4 visible-lg visible-md side-video pull-right"> <div class="cb-box"> <div class="ad"><?php echo getAd(array('place' => 'ad_320x250'), $_smarty_tpl); ?> </div> <!-- <a href="http://www.arvixe.com/clipbucket_hosting?utm_campaign=300x250_Demo&utm_medium=banner&utm_source=clipbucket.com"><img class="banner" src="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /assets/images/add320x250.png" style="margin-bottom: 10px; width: 100%;" > </a>--> <!-- <h3><?php echo smarty_lang(array('code' => "Most Popular"), $_smarty_tpl); ?> </h3> --> <?php if ($_GET['play_list'] == '') { ?> <?php $_smarty_tpl->tpl_vars['video'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['video']->_loop = false; $_from = $_smarty_tpl->tpl_vars['videos']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['video']->key => $_smarty_tpl->tpl_vars['video']->value) { $_smarty_tpl->tpl_vars['video']->_loop = true; ?> <?php echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/videos/video_popular.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php } ?> <?php } else { ?> <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['plist'])) { unset($_smarty_tpl->tpl_vars['smarty']->value['section']['plist']); } $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['name'] = 'plist'; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['loop'] = is_array($_loop = $_smarty_tpl->tpl_vars['items']->value) ? count($_loop) : max(0, (int) $_loop); unset($_loop); $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['show'] = true; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['loop']; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['step'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['loop'] - 1; if ($_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['show']) { $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['loop']; if ($_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['total'] == 0) { $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['show'] = false; } } else { $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['total'] = 0; } if ($_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['show']) { for ($_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['iteration'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['total']; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['iteration']++) { $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['iteration']; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['step']; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['step']; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['first'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['iteration'] == 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['last'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['total']; ?> <?php echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/manage/account_video.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('video' => $_smarty_tpl->tpl_vars['items']->value[$_smarty_tpl->getVariable('smarty')->value['section']['plist']['index']], 'control' => "onWatch", 'pid' => $_smarty_tpl->tpl_vars['playlist']->value['playlist_id']), 0); ?> <?php } } ?> <?php } ?> </div> </div> <!-- /Side bar--> </div> </div> <div style="height:20px"> </div> <script> //var aspect_ratio = 1.77778 var aspect_ratio = 2.2 var $cb_player = $("#cb_player"); $(document).ready(function(){ $cb_player.height( $cb_player.width() / aspect_ratio ); var videoInfo = $("#videoDescription").text(); var newInfo = videoInfo.replace(/(((https?:\/\/)|([\s\t]))(www.)?([a-z0-9]+)\.[a-z]+)/g, '<a href="$1">$1</a>'); $("#videoDescription").html(newInfo); comments_voting = '<?php echo $_smarty_tpl->tpl_vars['vdo']->value['comment_voting']; ?> '; _cb.getAllComments( '<?php echo $_smarty_tpl->tpl_vars['type']->value; ?> ', '<?php echo $_smarty_tpl->tpl_vars['vdo']->value['videoid']; ?> ', '<?php echo $_smarty_tpl->tpl_vars['vdo']->value['last_commented']; ?> ',1, '<?php echo $_smarty_tpl->tpl_vars['vdo']->value['comments_count']; ?> ', '<?php echo $_smarty_tpl->tpl_vars['object_type']->value; ?> ' ); // $('.cb-item-description').readmore({ // speed: 75, // maxHeight: 120, // moreLink : '<a href="#" class="btn btn-min btn-block btn-primary"><i class="glyphicon glyphicon-arrow-down"></i> <?php echo lang("Read more"); ?> </a>', // lessLink : '<a href="#" class="btn btn-min btn-block btn-default"><?php echo lang("Close"); ?> </a>' // }); $("#reportVideo").on({ click : function(e){ e.preventDefault(); $("#flag_item").show(); } }); $("#subscribeUser").on({ click: function(e){ e.preventDefault(); _cb.subscribeToChannel('<?php echo $_smarty_tpl->tpl_vars['video']->value['userid']; ?> ','subscribe_user','video_detail_result_cont'); } }); }); var resizePlayer = _cb.debounce(function() { $cb_player.height( $cb_player.width() / aspect_ratio ); }, 500, false); $(window).resize(resizePlayer); </script> <style type="text/css"> footer{ position: relative; top: 65px; } </style><?php }
function APITime($api) { if ($api->cacheHit) { return "updated " . niceTime($api->age) . " ago"; } else { return "updated <b>now</b>"; } }
public function GetOutput($Db) { global $sort, $ord, $cols; // req for sorting $Contracts = new eveApiContracts($Db); $full_url = FULL_URL; // TODO $time_start = microtime_float(); if (!$Contracts->fetch(CHAR_ID, USER_ID, API_KEY, CORP_MODE)) { $this->Output = $Contracts->Error; return false; } $time_end = microtime_float(); $time_api = $time_end - $time_start; $Db->updateConqStations(); $this->Updated = APITime($Contracts); $this->Title = "Contracts for " . USER_NAME; if (isset($_GET['testing'])) { die("<pre>" . print_r($Contracts->entries, true) . "</pre>"); } $ord = "ASC"; $cols = array("Type", "status", "System", "dateIssued", "dateFinished", "issuer", "contractor", "Price", "volume", "desc"); $sort = null; $this->Output .= sort_ctrl(); //$this->Output .= "<h5 style=\"display: inline\">### PAGE UNDER CONSTRUCTION - WATCH FOR ANVILS ###</h5>"; if (count($Contracts->entries) > 0) { $this->Output .= <<<LEGENDEND <table border="1" style="font-size: 80%; border-style: solid;"> <tr><th colspan="2">LEGEND</th></tr> <tr><th>time format</th><td>[Month.Days.Years] Hours:Minutes</td></tr> <tr><th>blue row:</th><td>this contract is on behalf of your corporation</td></tr> <tr><th>orange volume:</th><td>volume is greater than 30,000 m3</td></tr> <tr><th>yellow time:</th><td>less than 24hrs left on auction</td></tr> <tr><th>red time:</th><td>less than 1 hour left on auction</td></tr> <tr><th>red price:</th><td>this is the price that was/will be paid <b style="color:red">by</b> the contract acceptor</td></tr> <tr><th>green price:</th><td>this is the price that was/will be paid <b style="color:#0f0">to</b> the contract acceptor</td></tr> <tr><th><assignee></th><td>contract is assigned to assignee but has not been accepted</td></tr> </table><br> LEGENDEND; $this->Output .= count($Contracts->entries) . " entries. <b>Click an entry to get contract details.</b><br><br>"; $this->Output .= "<table class=\"contracts_table\" style=\"font-size:83%;\" border=1>"; $this->Output .= "<tr>"; foreach ($cols as $col) { $this->Output .= "<th>"; if (!isset($nosorting)) { $this->Output .= "<a href=\"{$full_url}&view=contracts&sort={$col}&order=" . ($sort == $col && $ord == "ASC" ? "DESC" : "ASC") . "\">"; } $this->Output .= $col; if (!isset($nosorting)) { $this->Output .= "</a>"; } $this->Output .= "</th>"; } $this->Output .= "</tr>"; $entries = $Contracts->entries; $ids = array(); foreach ($entries as &$entry) { if ((string) $entry["availability"] == "Private" && $entry["acceptor"] == "") { $entry["contractor"] = $entry["assignee"]; } else { if ($entry["acceptor"] == "") { if (isset($entry["bidder"])) { if ($entry["bidder"] == "") { $entry["contractor"] = ""; } else { $entry["contractor"] = "{$entry['bidder']}"; } } else { $entry["contractor"] = ""; } } else { $entry["contractor"] = $entry["acceptor"]; } } $entry["Price"] = ($entry["reward"] > 0 || $entry["reward"] == $entry["price"] ? -1 : 1) * (double) ($entry["price"] + (double) $entry["reward"]); $ids[] = (string) $entry['issuerID']; $ids[] = (string) $entry['assigneeID']; } $ids = array_unique($ids); $redIDS = GetRedIDS($ids, $Db); if (isset($redIDS[0]) && $redIDS[0] == 0) { $redIDS = array(); } unset($entry); if ($sort != null && array_key_exists($sort, $entries[0])) { usort($entries, "globl_sortfunc"); } $alt_b = false; $rowclass = " class=\"nohover" . (isset($_GET['expandall']) ? "" : " contractbody") . "\""; foreach ($entries as $entry) { $alt_b = !$alt_b; $hasItems = isset($entry["buying"]) && ($entry["sellingItems"] != "" || $entry["buyingItems"] != ""); $this->Output .= "<tr onclick=\"toggle_row_visibility('contract" . $entry["contractID"] . "'); return false;\""; if (in_array($entry['issuerID'], $redIDS) || in_array($entry['assigneeID'], $redIDS)) { if ($alt_b) { $this->Output .= " class=\"redAlt"; } else { $this->Output .= " class=\"redMain"; } } else { if ($alt_b) { $this->Output .= " class=\"alt"; } else { $this->Output .= " class=\"main"; } } $this->Output .= ($entry["forCorp"] == 1 ? " corp_entry_row" : "") . " hover clickablerow\">"; //$this->Output .= "<th scope=\"row\">" . $entry["contractID"] . "</th>"; $this->Output .= "<th scope=\"row\">" . $entry["Type"] . "</th>"; if (CONTRACT_ACTIVE($entry["status"])) { $this->Output .= "<td class=\"pendingcontractstatus\">" . $entry["status"] . "</td>"; } else { if ($entry["status"] == "Failed") { $this->Output .= "<td class=\"failedcontractstatus\">FAILED</td>"; } else { if ($entry["status"] == "Rejected") { $this->Output .= "<td class=\"failedcontractstatus\">Rejected</td>"; } else { $this->Output .= "<td class=\"contractstatus\">" . $entry["status"] . "</td>"; } } } $this->Output .= "<td>" . $entry["System"] . "</td>"; $this->Output .= "<td>" . shortDateTime($entry["dateIssued"]) . "</td>"; if (CONTRACT_ACTIVE((string) $entry["status"])) { if ($entry["timeRemaining"] <= 3600 * 24) { $this->Output .= "<td style=\"color: " . timeToColor($entry["timeRemaining"]) . "\">"; } else { $this->Output .= "<td>"; } $this->Output .= niceTime($entry["timeRemaining"], 2) . " left</td>"; } else { if ((string) $entry["status"] == "Failed") { $this->Output .= "<td class=\"failedcontractstatus\">FAILED</td>"; } else { if ($entry["status"] == "Rejected") { $this->Output .= "<td class=\"failedcontractstatus\">Rejected</td>"; } else { if ($entry["dateFinished"] != "") { $this->Output .= "<td>" . shortDateTime($entry["dateFinished"]) . "</td>"; } else { $this->Output .= "<td> </td>"; } } } } $this->Output .= "<td>" . $entry["issuer"] . "</td>"; if ((string) $entry["availability"] == "Private" && $entry["acceptor"] == "") { $this->Output .= "<td><" . $entry["assignee"] . "></td>"; } else { if ($entry["acceptor"] == "") { if (isset($entry["bidder"])) { if ($entry["bidder"] == "") { $this->Output .= "<td style=\"color:grey;\"><no bids></td>"; } else { $this->Output .= "<td style=\"color:grey;\"><bid {$entry['bidder']}></td>"; } } else { $this->Output .= "<td style=\"color:grey;\"><public></td>"; } } else { $this->Output .= "<td>" . $entry["acceptor"] . "</td>"; } } $this->Output .= "<td align=right style=\"color: " . ($entry["reward"] > 0 || $entry["reward"] == $entry["price"] ? "#007700" : "#BB0000") . ";\">" . number_format((double) $entry["price"] + (double) $entry["reward"], 2) . " ISK</td>"; if ($entry["volume"] > 30000) { $this->Output .= "<td style=\"color: #FFA500\">" . shortVolume($entry["volume"]) . "</td>"; } else { $this->Output .= "<td>" . shortVolume($entry["volume"]) . "</td>"; } $this->Output .= "<td width=\"500\"" . ">" . $entry["desc"]; if ($hasItems) { if ($entry["desc"] != "") { $this->Output .= "<br>"; } $this->Output .= "<span class=\"contract_items\">"; if ($entry["sellingItems"] != "") { switch ($entry["Type"]) { case "Trade": $this->Output .= "<b>Offering:</b> "; break; case "Gift": $this->Output .= "<b>Giving:</b> "; break; default: $this->Output .= "<b>Selling:</b> "; break; } $this->Output .= "{$entry['sellingItems']}<br>"; } if ($entry["buyingItems"] != "") { $this->Output .= ($entry["Type"] != "Trade" ? "<b>Buying:</b> " : "<b>Looking for:</b> ") . "{$entry['buyingItems']}"; } $this->Output .= "</span>"; } $this->Output .= " </td>\n"; $this->Output .= "</tr>\n"; /// BEGIN CONTRACT DETAILS $this->Output .= "<tr{$rowclass} id=\"contract" . $entry["contractID"] . "\"><td colspan=\"" . count($cols) . "\">"; $this->Output .= "<a name=\"" . $entry["contractID"] . "\"></a><h3>"; if ($entry["title"] != "") { $this->Output .= "{$entry['title']} - "; } if ($entry["type"] == "ItemExchange") { $this->Output .= "Item Exchange [{$entry["Type"]}]"; } else { $this->Output .= "{$entry["Type"]}"; } $this->Output .= " - {$entry['status']}</h3>"; $this->Output .= "<b>Location</b>: {$entry["startStation"]}<br>"; if ($entry["type"] == "Courier") { $this->Output .= "<b>Destination</b>: {$entry["endStation"]}({$entry["endStationID"]})<br>"; } $this->Output .= "<b>Posted</b>: {$entry['dateIssued']}<br>"; if ((double) $entry["acceptorID"] != 0 && $entry["type"] == "Courier") { $this->Output .= "<b>Accepted</b>: {$entry['dateAccepted']}<br>"; } if ((string) $entry["status"] != "Completed" && (string) $entry["status"] != "Deleted" && (string) $entry["status"] != "Failed") { $this->Output .= "<b>Remaining</b>: <span"; if ($entry["timeRemaining"] <= 3600 * 24) { $this->Output .= " style=\"color: " . timeToColor($entry["timeRemaining"]) . "\">"; } else { $this->Output .= ">"; } $this->Output .= niceTime($entry["timeRemaining"], 3) . "</span><br>"; } else { $this->Output .= "<b>Finished</b>: {$entry['dateFinished']}<br>"; } $this->Output .= "<b>Contractor</b>: "; if ((string) $entry["availability"] == "Private" && $entry["acceptor"] == "") { $this->Output .= "<" . $entry["assignee"] . ">"; } else { if ($entry["acceptor"] == "") { if (isset($entry["bidder"])) { if ($entry["bidder"] == "") { $this->Output .= "<span style=\"color:grey;\"><no bids></span>"; } else { $this->Output .= "<span style=\"color:grey;\"><bid {$entry['bidder']}></span>"; } } else { $this->Output .= "<span style=\"color:grey;\"><public></span>"; } } else { $this->Output .= $entry["acceptor"]; } } $this->Output .= "<br>"; if ($entry["reward"] > 0 || $entry["reward"] == $entry["price"]) { $this->Output .= "<b>Reward</b>: <span style=\"color:007700\">"; } else { $this->Output .= "<b>Price</b>: <span style=\"color:BB0000\">"; } $this->Output .= number_format((double) $entry["price"] + (double) $entry["reward"], 2) . " ISK</span></br>"; if ((double) $entry["collateral"] != 0) { $this->Output .= "<b>Collateral</b>: <span style=\"color:#f00;\">" . number_format((double) $entry["collateral"], 2) . " ISK</span></br>"; } $this->Output .= "<b>Volume</b>: "; if ($entry["volume"] > 30000) { $this->Output .= "<span style=\"color: #FFA500\">" . number_format($entry["volume"], 2) . " m3</span>"; } else { $this->Output .= number_format($entry["volume"], 2) . " m3"; } $this->Output .= "<br>"; if ($hasItems) { $this->Output .= "<br><table class=\"contracts_wtt\"><tr>"; if ($entry["sellingItems"] != "") { $this->Output .= "<th> " . ($entry["Type"] != "Trade" ? $entry["Type"] == "Gift" ? "<b>Giving</b>:" : "<b>Selling</b> " : "<b>Offering:</b> ") . "</th>"; } if ($entry["buyingItems"] != "") { $this->Output .= "<th> " . ($entry["Type"] != "Trade" ? "<b>Buying</b> " : "<b>Looking for:</b> ") . "</th>"; } $this->Output .= "</tr><tr>"; if ($entry["sellingItems"] != "") { $this->Output .= "<td>" . str_replace("\n", "<br>", $entry["sellingItemsList"]) . "</td>"; } if ($entry["buyingItems"] != "") { $this->Output .= "<td>" . str_replace("\n", "<br>", $entry["buyingItemsList"]) . "</td>"; } $this->Output .= "</tr></table>"; } $this->Output .= ""; $this->Output .= "<br><h3 style=\"font-size: 150%; border-bottom: 0px;\"><a href=\"#\" onclick=\"toggle_row_visibility('contract" . $entry["contractID"] . "'); return false;\">[Hide]</a></h3>"; $this->Output .= ""; $this->Output .= ""; $this->Output .= "</td></tr>\n"; } $this->Output .= "</table>"; if (isset($_GET['contract'])) { $this->Output .= "<script>toggle_row_visibility('contract{$_GET['contract']}'); location.hash='{$_GET['contract']}';</script>"; } } else { $this->Output .= (CORP_MODE ? "Corporation" : "Character") . " has no Contracts in the last 3 months.<br>"; } $this->Times = getPageTimes($Db, $time_api, microtime_float() - $time_start); return true; }
$i % 2 == 0 ? $bgcolor = "" : ($bgcolor = "#F5F5F5"); $row_data .= '<tr class="tdhover" id="tdata" bgcolor = "' . $bgcolor . '" align = "left">'; $row_data .= '<td>'; $row_data .= $i + 1; $row_data .= '</td>'; $row_data .= '<td align="left">'; $row_data .= ' ' . getUser_info($all_activity[$i]->userID, 'username'); $row_data .= '</td>'; $row_data .= '<td align="left">'; $row_data .= ' ' . $all_activity[$i]->activity; $row_data .= '</td>'; $row_data .= '<td align="left">'; $row_data .= ' ' . $all_activity[$i]->itemname; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= ' ' . niceDate($all_activity[$i]->activity_date); $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= ' ' . niceTime($all_activity[$i]->activity_date); $row_data .= '</td>'; $row_data .= '</tr>'; } } $dateprepared = time(); $dateprepared = friendlyDate($dateprepared); // my friendly date - {mh} // start compiling the page.. $tpl = new template_parser('../templates/reports/preview_audit_trail.tpl.php'); $tags = array('{FULLNAME}' => $fullname, '{POSITION}' => $position, '{DATE_PREPARED}' => $dateprepared, '{REPORT_TITLE}' => $rpt_title, '{USERNAME}' => 'Username', '{ACTION}' => 'Activity', '{ITEMNAME}' => 'Message', '{MESSAGE}' => $message, '{DATE}' => 'Date', '{TIME}' => 'Time', '{USERNAMES}' => $opt_username, '{ACTIVITIES}' => $opt_activity, '{PAGELINK}' => $pagelink->pagelinks, '{TABLE_DATA}' => $row_data, '{SITENAME}' => 'CMS Adminss', '{TOPNAV}' => 'top_menu.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
<?php $tweet = $post->get('text'); // Convert URL's with protocol prefix $tweet = ereg_replace("[a-zA-Z]+://([-]*[.]?[a-zA-Z0-9_/-?&%])*", "<a href=\"\\0\">\\0</a>", $tweet); //Convert URL with just www. $tweet = ereg_replace("(^| |\n)(www([-]*[.]?[a-zA-Z0-9_/-?&%])*)", "\\1<a href=\"http://\\2\">\\2</a>", $tweet); //Convert # hashtags $tweet = ereg_replace("(^| |\n)(\\#([-]*[.]?[a-zA-Z0-9_/-?&%])*)", "\\1<a href=\"http://search.twitter.com/search?q=\\2\">\\2</a>", $tweet); $tweet = str_replace("/#", "/", $tweet); //Convert @ replies $tweet = ereg_replace("(^| |\n)(\\@([-]*[.]?[a-zA-Z0-9_/-?&%])*)", "\\1@<a href=\"http://www.twitter.com/\\2\">\\2</a>", $tweet); $tweet = str_replace("/@", "/", $tweet); $tweet = str_replace(">@", ">", $tweet); // Make the time prettier $createstamp = $post->get('created_at'); $relative_time = niceTime(strtotime($createstamp)); ?> <li><?php echo $tweet; ?> <span>posted <a href="http://twitter.com/<?php echo $twitter_username; ?> /status/<?php echo $post->get('id'); ?> "><?php echo $relative_time; ?> </a></span></li>
<?php @($db = new mysqli("localhost", "dunaich_csaba", "12345", "dunaich_database")); if (mysqli_connect_errno()) { printf("Verbindung fehlgeschlagen: %s\n", mysqli_connect_error()); exit; } if ($resultat = $db->query('SELECT * FROM zeiterfassungstabelle ORDER by userId')) { echo "<table class='table table-striped'>"; echo "<th>userId</th> <th>nachname</th> <th>vorname</th> <th>Totalzeit</th><th>status</th><th>letzterCheck</th>"; while ($daten = $resultat->fetch_object()) { echo "<tr>"; echo "<td>{$daten->userId}</td> <td>{$daten->nachname}</td> <td>{$daten->vorname}</td> <td>" . niceTime($daten->totalzeitSekunden) . "</td><td>{$daten->status}</td><td>" . date("D, d.M.Y - H:i:s", $daten->letzterCheck - 3600) . "</td>"; echo "</tr>"; } echo "</table>"; $resultat->close(); } else { echo "Es konnten keine Daten ausgelesen werden."; } $db->close();
} else { echo "habe letzten Check nicht gesetzt"; } if ($db->query($setzeTotalzeit)) { //echo "habe Totalzeit gesetzt"; } else { echo "habe Totalzeit nicht gesetzt"; } if ($db->query($setzeStatus)) { //echo "habe status gesetzt"; } else { echo "habe status nicht gesetzt"; } if ($resultat = $db->query('SELECT * FROM zeiterfassungstabelle WHERE userId = "' . $_POST['userId'] . '" ORDER by userId') and mysqli_num_rows($db->query('SELECT * FROM zeiterfassungstabelle WHERE userId = "' . $_POST['userId'] . '" ORDER by userId'))) { while ($daten = $resultat->fetch_object()) { echo "<div class='alert alert-success'><h3>{$daten->nachname} {$daten->vorname}: " . niceTime($letzteZeitspanne) . " Sekunden gearbeitet - Gestempelt um " . niceTime($checkInOutZeit) . "</h3></div>"; //Verschieden Strafen für verschiedene Vergehen: // Zu lange nicht Ausgecheckt if ($letzteZeitspanne > 60) { $abzug = (int) ($letzteZeitspanne / 10); echo "<div class='alert alert-warning'><h3>Sie haben zu lange nicht Ausgecheckt, wir ziehen Ihnnen {$abzug} Sekunden ab.</h3></div>"; $timeout += 3000; } $vollstreckeAbzug = "\n UPDATE zeiterfassungstabelle\n SET totalzeitSekunden = totalzeitSekunden - " . $abzug . "\n WHERE userId = '" . $_POST['userId'] . "'\n "; if ($db->query($vollstreckeAbzug)) { //echo "habe Totalzeit gesetzt"; } else { echo "Fehler beim abziehen der Strafzeit."; } } $resultat->close();