/** * menu - Visszaadja a menuspositions (menupos) id szerint * a men�pontokat almen�ivel egy�tt. * * Amennyiben a $menupos param�ter �rt�ke 0, * akkor a teljes men�szerkezetet k�rdezi le. * Az $onlyactive param�terrel TRUE eset�n * csak az akt�v men�pontok alszintjeit * olvassa be, FALSE eset�n pedig azokat is, * amelyek f� �ga nem lett kiv�lasztva, magyarul * a menupozici�hoz tartoz� teljes fastrukt�r�t. * $type vagy index vagy admin lehet, att�l f�gg�en, * hogy melyik r�szen szeretn�nk a men�t lek�rdezni. * ha nem adunk meg semmit, akkor a teljes men�t lek�rdezi. * * @param boolean $onlyactive * @param int $parent * @param mixed $lang * @param int $active - csak az aktiv menuk (1) vagy az inaktivak is (0) * * @access public * * @return void */ function categories($onlyactive = TRUE, $parent = 0, $level = 1, $lang = NULL, $active = 1) { global $mdb2, $aktiv_categories; //nyelvnel a lekerdezeshez szukseges mezo if ($lang == NULL) { $query_lang = " AND c.lang = '" . $_SESSION['site_lang'] . "'"; } elseif ($lang == "all") { $query_lang = ""; } else { $query_lang = " AND c.lang = '{$lang}'"; } //aktiv meghatarozasa if ($active == 1) { $query_active = " AND c.is_active= 1 "; } else { $query_active = ""; } $menuk = array(); $categories = array(); $i = 0; $query = "\n\t\tSELECT c.category_id AS cid, c.category_name AS cname, c.category_desc AS cdesc, c.parent AS cparent, c.is_active AS isact, \n\t\t\tc.lang AS clang, u1.name AS adduser, c.add_date AS adddate, u2.name AS moduser, c.mod_date AS moddate \n\t\tFROM iShark_Shop_Category c \n\t\tLEFT JOIN iShark_Users u1 ON u1.user_id = c.add_user_id \n\t\tLEFT JOIN iShark_Users u2 ON u2.user_id = c.mod_user_id \n\t\tWHERE c.parent = {$parent} {$query_lang} {$query_active}\n\t"; //ha ABC szerint rendezzuk sorba if ($_SESSION['site_shop_ordertype'] == 1) { $query .= "\n\t\t\tORDER BY c.category_name, c.parent, c.lang\n\t\t"; } //ha egyedi sorrend szerint rendezzuk if ($_SESSION['site_shop_ordertype'] == 2) { $query .= "\n\t\t\tORDER BY c.sortorder, c.parent, c.lang\n\t\t"; } $result =& $mdb2->query($query); while ($row = $result->fetchRow()) { $query2 = "\n\t\t\tSELECT parent \n\t\t\tFROM iShark_Shop_Category \n\t\t\tWHERE parent = " . $row['cid'] . "\n\t\t"; $result2 = $mdb2->query($query2); $aktiv = isset($aktiv_categories[$row['cid']]); $almenuk = array(); if ($aktiv || !$onlyactive) { $almenuk = categories($onlyactive, $row['cid'], $level + 1, $lang, $active); } if ($result2->numRows() > 0) { $categories[$i]['is_sub'] = '1'; } $categories[$i]['title'] = $row['cname']; $categories[$i]['clang'] = $row['clang']; $categories[$i]['level'] = $level; $categories[$i]['cid'] = $row['cid']; $categories[$i]['cparent'] = $row['cparent']; $categories[$i]['isact'] = $row['isact']; $categories[$i]['ausr'] = $row['adduser']; $categories[$i]['adate'] = $row['adddate']; $categories[$i]['musr'] = $row['moduser']; $categories[$i]['mdate'] = $row['moddate']; if (!empty($almenuk)) { $categories[$i]['element'] = $almenuk; } $i++; } return $categories; }
function categories($parent_id) { global $db; $categories = array(); foreach ($db->query("SELECT category_id, category_name FROM " . config_item('cart', 'table_categories') . " WHERE parent_id = '" . $parent_id . "' ORDER BY category_name ASC") as $value) { $categories[] = array('category_id' => $value['category_id'], 'category_name' => get_path($value['category_id'])); $categories = array_merge($categories, categories($value['category_id'])); } return $categories; }
function onzip($zipcode) { global $zip; $zip = $zipcode; $categories = categories($channel); if ($channel == 'TEXT') { $sayZip = $zip; } else { $sayZip = "<say-as interpret-as='vxml:digits'>{$zip}</say-as>"; } $event = ask("<speak>What are you looking for in {$sayZip}?</speak>", array("choices" => $categories, 'voice' => 'allison', "onChoice" => create_function('$event', 'onCategory($event->value);'))); }
include_once('ressources/class.dansguardian.inc'); header("Pragma: no-cache"); header("Expires: 0"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); $user=new usersMenus(); if(!$user->AsSquidAdministrator){ $tpl=new templates(); echo "alert('".$tpl->javascript_parse_text("{ERROR_NO_PRIVS}").");"; exit; } if(isset($_GET["popup"])){popup();exit;} if(isset($_GET["status"])){status();exit;} if(isset($_GET["categories"])){categories();exit;} if(isset($_GET["cat-search"])){categories_search();exit;} js(); function status(){ $q=new mysql(); $page=CurrentPageName(); $tpl=new templates(); $total=FormatNumber($q->COUNT_ROWS("dansguardian_community_categories","artica_backup"),0,'.',' ',3); $sql="SELECT count(*) as tcount FROM `dansguardian_sitesinfos` WHERE `dbpath` = ''"; $ligne=@mysql_fetch_array($q->QUERY_SQL($sql,'artica_backup'));
public function categories() { $attributes = $this->attributes(); $attributes['_content'] = $this->content(); return categories($attributes); }
?> </div> </div> </div> <!-- on ne peut pas commenter si on n'est pas connecté --> <?php if (verifco($mdp, $id_utilisateur) == TRUE) { ?> <div class="bandeaubas" style="height:175px;text-align:left;"> <div class="bandeauhaut" style="height:50%"> <div class="bandeauhaut" style="height:25%"> Catégorie d'événement: </div> <div class="bandeaubas" style="height:75%; margin-top:5px; font-weight:normal;"> <?php categories($Event_id); ?> </div> </div> <div class="bandeaubas" style="height:50%"> <div class="bleft" style="width:75%; height:100%"> <div class="bandeauhaut" style="height:25%;"> Ils y participent </div> <div class="bandeaubas" style="height:75%;"> <div class="carroussel"> <?php carrousselprofiles(); ?> </div>
<td class='block'> </td> </tr> <tr> <td><input type='text' name='search' size='30' maxlength='50' value='<?php $trova; ?> '></td> <td> <?php $category = !isset($_GET["category"]) ? 0 : explode(";", (int) $_GET["category"]); if (is_array($category)) { $category = array_map("intval", $category); } else { $category = 0; } categories($category[0]); if (isset($_GET["active"])) { $active = intval($_GET["active"]); } else { $active = 1; } // all if ($active == 0) { $where = " WHERE 1 = 1"; $addparam .= "active=0"; } elseif ($active == 1) { $where = " WHERE leechers + seeds > 0"; $addparam .= "active=1"; } elseif ($active == 2) { $where = " WHERE leechers + seeds = 0"; $addparam .= "active=2";
Views <?php echo $video['views']; ?> <br /> Duration <?php echo SetTime($video['duration']); ?> </tr> </table> <hr size="1" noshade> ]]> </description> <category><?php echo strip_tags(categories($video['category'], 'video')); ?> </category> <guid isPermaLink="true"><?php echo video_link($video); ?> </guid> <pubDate><?php echo $video['date_added']; ?> </pubDate> <media:player url="<?php echo video_link($video); ?> " /> <media:thumbnail url="<?php
require $smarty_dir . '/libs/Smarty.class.php'; $smarty = new Smarty(); $smarty->template_dir = $smarty_dir . 'templates'; $smarty->compile_dir = $smarty_dir . 'templates_c'; $smarty->cache_dir = $smarty_dir . 'cache'; $smarty->config_dir = $smarty_dir . 'configs'; $str = file_get_contents('config.txt'); $config = parse_ini_string($str, true); // возвращаем файл config.txt в виде массива $hostName = $config['hostName']; $userName = $config['userName']; $dbPassword = $config['dbPassword']; $dbName = $config['dbName']; require_once 'functions.php'; $dbc = db_connect($hostName, $userName, $dbPassword, $dbName); $categories = categories($dbc); $cities = cities($dbc); $formParams = prepareAD($data = null, $head = 'Страница добавления объявления', $button = 'Далее'); $adStore = adStore($dbc); $id = isset($_GET['id']) ? $_GET['id'] : ''; if (isset($_GET['id'])) { $ad = $adStore[$id]; $formParams = prepareAD($ad, $head = 'Страница редактирования', $button = 'Готово'); } else { if (isset($_GET['del'])) { $id_for_del = $_GET['del']; del($id_for_del, $dbc); header('Location: index.php'); } if (isset($_POST['main_form_submit'])) { $uns = isset($adStore) ? $adStore : array();
function endOutput() { global $BASEURL, $user_id, $TRACKER_ANNOUNCEURLS; ?> </center> <?php echo "<center>" . INSERT_DATA . "<br /><br />"; echo " " . ANNOUNCE_URL . "<br /><b>"; foreach ($TRACKER_ANNOUNCEURLS as $taurl) { echo $taurl . '<br />'; } echo "</b><br /></center>"; ?> <form name='upload' method='post' enctype='multipart/form-data'> <table class='lista' align='center'> <tr> <td class='header'><?php echo TORRENT_FILE; ?> </td> <td class='lista' align='left'> <?php if (function_exists("sha1")) { echo "<input type='file' name='torrent'>"; } else { echo "<i>" . NO_SHA_NO_UP . "</i>"; } ?> </td> </tr> <?php echo "<tr><td class='header'>" . CATEGORY_FULL . "</td><td class='lista' align='left'>"; categories($category[0]); echo "</td></tr>"; ?> <tr> <td class='header'><?php echo FILE_NAME; ?> </td> <td class='lista' align='left'><input type='text' name='filename' size='50' maxlength='200' /></td> </tr> <tr> <td class='header' valign='top'><?php echo DESCRIPTION; ?> </td> <td class='lista' align='left'><?php textbbcode("upload", "info"); ?> </td> </tr> <?php print "<tr>\n <td colspan='2'><input type='hidden' name='user_id' size='50' value='" . $user_id . "' /></td>\n </tr>"; print "<tr>\n <td class='header'>" . TORRENT_ANONYMOUS . "</td>\n <td class='lista'> " . NO . "<input type='radio' name='anonymous' value='false' checked /> " . YES . "<input type='radio' name='anonymous' value='true' /></td>\n </tr>"; if (function_exists("sha1")) { echo "<tr>\n <td class='lista' align='center' colspan='2'><input type='checkbox' name='autoset' value='enabled' disabled checked />" . TORRENT_CHECK . "</td>\n </tr>"; } ?> <tr> <td align='right'><input type='submit' value='<?php echo FRM_SEND; ?> ' /></td> <td align='left'><input type='reset' value='<?php echo FRM_RESET; ?> ' /></td> </tr> </table> </form> <?php print "</td></tr></table>"; block_end(); }
</a> <?php foreach (categories_nav() as $t) { ?> <a href="<?php echo $t['url']; ?> " title="<?php echo $t['catname']; ?> "><?php echo $t['catname']; ?> </a> <?php foreach (categories($t['catid']) as $t1) { ?> <a title="<?php echo $t1['catname']; ?> " href="<?php echo $t1['url']; ?> "><?php echo $t1['catname']; ?> </a> <?php } } ?>
<span></span> <li><a title="<?php echo $t4['catname']; ?> " href="<?php echo $t4['url']; ?> "><?php echo $t4['catname']; ?> </a> <?php if (count(categories($t4['catid']))) { ?> <ul><?php foreach (categories($t4['catid']) as $t5) { ?> <span></span> <li><a title="<?php echo $t5['catname']; ?> " href="<?php echo $t5['url']; ?> "><?php echo $t5['catname']; ?> </a></li> <?php } ?>
olabilir. </div> <?php } ?> </div> <div class="post post-info"> <span class="date"> <?php echo tr_date('d F Y', $created_at->sec); ?> </span> <span class="category"> <?php echo categories($categories); ?> </span> <span class="tags"> <?php echo tags($tags); ?> </span> <span class="read"> <?php echo $counter; ?> kez okundu. </span> </div>
defined('_JEXEC') or die('Restricted Access'); require_once JApplicationHelper::getPath('admin_html'); JTable::addIncludePath(JPATH_COMPONENT . DS . 'tables'); switch ($task) { case 'conf': conf($option); break; case 'saveconf': saveconf($option, $task); break; case 'prune': pruneclassified(); break; case 'categories': categories($option); break; case 'add': case 'edit': editClassified($option); break; case 'apply': case 'save': saveClassified($option, $task); break; case 'remove': removeClassifieds($option); break; case 'addcategory': case 'editcategory': editCategory();
//loggolas logger($page . '_' . $sub_act); //visszadobjuk a lista oldalra - ha keresesbol jon, akkor oda if (isset($_REQUEST['s']) && is_numeric($_REQUEST['s']) && $_REQUEST['s'] == 1 && isset($_REQUEST['searchtext']) && isset($_REQUEST['searchtype'])) { header('Location: admin.php?p=' . $module_name . '&act=sea&pageID=' . $page_id . '&searchtext=' . $_REQUEST['searchtext'] . '&searchtype=' . $_REQUEST['searchtype']); exit; } else { header('Location: admin.php?p=' . $module_name . '&act=' . $page); exit; } } else { $acttpl = 'error'; $tpl->assign('errormsg', $locale->get('category_error_category_noexists')); return; } } //torles vege /** * ha a listat mutatjuk */ if ($sub_act == "lst") { include_once $include_dir . '/function.classifieds.php'; if ($_SESSION['site_class_maxcat'] > $groupnums || $_SESSION['site_class_maxcat'] == 0) { $add_new = array(array('link' => 'admin.php?p=' . $module_name . '&act=' . $page . '&sub_act=add', 'title' => $locale->get('category_title_category_add'), 'pic' => "add.jpg")); $tpl->assign('add_new', $add_new); } //atadjuk a smarty-nak a kiirando cuccokat $tpl->assign('category_list', categories(TRUE, 0, '', 0, 0)); //megadjuk a tpl file nevet, amit atadunk az admin.php-nek $acttpl = "classifieds_categories_list"; }
do_sqlquery("UPDATE `{$TABLE_PREFIX}files` SET `free_expire_date`='" . $DT1 . "',`free`='" . $DT2 . "',`happy_hour`='" . $DT3 . "' ,`catid`='" . $categoria . "' WHERE " . $DT5 . " `external`='no' ", true); do_sqlquery("ALTER TABLE `{$TABLE_PREFIX}files` CHANGE `free` `free` ENUM( 'yes', 'no' ) NULL DEFAULT '" . $DT2 . "'") or sqlerr(); $DTxbtt = $_POST["free"] ? "0" : "100"; // xbtt if ($XBTT_USE) { do_sqlquery("UPDATE xbt_files SET down_multi={$DTxbtt}"); do_sqlquery("ALTER TABLE xbt_files CHANGE `down_multi` `down_multi` INT NULL DEFAULT '{$DTxbtt}'", true); } header("Location: {$BASEURL}/{$returnto}"); } else { $query = do_sqlquery("SELECT * FROM `{$TABLE_PREFIX}files` WHERE `external`='no'", true); $row = mysqli_fetch_array($query); $category = !isset($_GET["category"]) ? 0 : explode(";", $_GET["category"]); if (is_array($category)) { $category = array_map("intval", $category); } else { $category = 0; } $combo_categories = categories($category[0]); $admintpl->set("language", $language); $admintpl->set("expire_date", substr($row["free_expire_date"], 0, -9)); $admintpl->set("expire_time", substr($row["free_expire_date"], -8, -6)); $admintpl->set("frm_action", "index.php?page=admin&user="******"uid"] . "&code=" . $CURUSER["random"] . "&do=free&action=send"); $admintpl->set("free_checked", $row["free"] == "yes" ? "checked=\"checked\"" : ""); $admintpl->set("happy_checked", $row["happy_hour"] == "yes" ? "checked=\"checked\"" : ""); if ($row["catid"] == 0 or $row["catid"] == "") { $admintpl->set("cat", $combo_categories); } else { $admintpl->set("cat", categories($row["catid"])); } }
?> </td> </tr><tr> <td align='right' class='header'><?php echo DESCRIPTION; ?> :</td><td class='lista'><?php textbbcode("edit", "comment", security::html_safe(unesc($results["comment"]))); ?> </td> </tr> <tr> <?php echo "<td align='right' class='header'>" . CATEGORY_FULL . ":</td><td class='lista' align='left'>"; categories($results["cat_name"]); echo "</td>"; include INCL_PATH . 'offset.php'; ?> </tr> <tr> <td align='right' class='header'><?php echo SIZE; ?> :</td><td class='lista'><?php echo misc::makesize((int) $results["size"]); ?> </td> </tr> <tr> <td align='right' class='header'><?php
$torrent['visible'] .= "<option value=" . $row['id_level'] . " " . $selected . ">" . $row['level'] . "</option>"; } } $torrent['visible'] .= "</select>"; /*End sticky by losmi*/ $torrent["link"] = "index.php?page=edit&info_hash=" . $results["info_hash"] . "&returnto=" . urlencode($link); $torrent["filename"] = $results["filename"]; $torrent["tag"] = $results["tag"]; $torrent["info_hash"] = $results["info_hash"]; $torrent["description"] = textbbcode("edit", "comment", unesc($results["comment"])); $torrent["size"] = makesize($results["size"]); include dirname(__FILE__) . "/include/offset.php"; $torrent["date"] = date("d/m/Y", $results["data"] - $offset); $torrent["complete"] = $results["finished"] . " " . $language["X_TIMES"]; $torrent["peers"] = $language["SEEDERS"] . ": " . $results["seeds"] . "," . $language["LEECHERS"] . ": " . $results["leechers"] . "=" . ($results["leechers"] + $results["seeds"]) . " " . $language["PEERS"]; $torrent["cat_combo"] = categories($results["cat_name"]); //$s; if ($CURUSER['edit_torrents'] == "yes" && $CURUSER['moderate_trusted'] == 'yes') { switch ($moder_status) { case 'ok': $checked1 = "SELECTED"; break; case 'bad': $checked2 = "SELECTED"; break; case 'um': $checked3 = "SELECTED"; break; } $torrent["moder"] = "<select name=\"moder\" id=\"icon\" onchange=\"showimage()\">\n <option {$checked1} value=\"ok\">" . $language["MODERATE_STATUS_OK"] . "</option>\n <option {$checked2} value=\"bad\">" . $language["MODERATE_STATUS_BAD"] . "</option>\n <option {$checked3} value=\"um\">" . $language["MODERATE_STATUS_UN"] . "</option>\n </select> "; }
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 }
$uploadtpl->set("COMMENT_NOTIFY_TRUE", ""); $uploadtpl->set("COMMENT_NOTIFY_FALSE", "checked=\"checked\""); } switch ($status) { case 0: foreach ($TRACKER_ANNOUNCEURLS as $taurl) { $announcs = $announcs . "{$taurl}<br />"; } $category = !isset($_GET["category"]) ? 0 : explode(";", $_GET["category"]); // sanitize categories id if (is_array($category)) { $category = array_map("intval", $category); } else { $category = 0; } $combo_categories = categories($category[0]); $gold_level = ''; $res = get_result("SELECT * FROM {$TABLE_PREFIX}gold WHERE id='1'", true); foreach ($res as $key => $value) { $gold_level = $value["level"]; } if ($gold_level > $CURUSER['id_level']) { $uploadtpl->set("upload_gold_level", false, true); } else { $uploadtpl->set("upload_gold_level", true, true); } $gold_select_box = createGoldCategories(); $uploadtpl->set("upload_gold_combo", $gold_select_box); $bbc = textbbcode("upload", "info"); $uploadtpl->set("upload.announces", $announcs); $uploadtpl->set("upload_categories_combo", $combo_categories);
require $smarty_dir . '/libs/Smarty.class.php'; $smarty = new Smarty(); $smarty->template_dir = $smarty_dir . 'templates'; $smarty->compile_dir = $smarty_dir . 'templates_c'; $smarty->cache_dir = $smarty_dir . 'cache'; $smarty->config_dir = $smarty_dir . 'configs'; $str = file_get_contents('config.txt'); $config = parse_ini_string($str, true); // возвращаем файл config.txt в виде массива $hostName = $config['hostName']; $userName = $config['userName']; $dbPassword = $config['dbPassword']; $dbName = $config['dbName']; require_once 'functions.php'; db_connect($hostName, $userName, $dbPassword, $dbName); $categories = categories(); $cities = cities(); $formParams = prepareAD($data = null, $head = 'Страница добавления объявления', $button = 'Далее'); $adStore = adStore(); $id = isset($_GET['id']) ? $_GET['id'] : ''; if (isset($_GET['id'])) { $ad = $adStore[$id]; $formParams = prepareAD($ad, $head = 'Страница редактирования', $button = 'Готово'); } else { if (isset($_GET['del'])) { $id_for_del = $_GET['del']; del($id_for_del); header('Location: index.php'); } if (isset($_POST['main_form_submit'])) { $uns = isset($adStore) ? $adStore : array();
include_once 'ressources/class.templates.inc'; include_once 'ressources/class.ldap.inc'; include_once 'ressources/class.users.menus.inc'; include_once 'ressources/class.mysql.inc'; include_once 'ressources/class.groups.inc'; include_once 'ressources/class.dansguardian.inc'; $usersmenus = new usersMenus(); if (!$usersmenus->AsDansGuardianAdministrator) { $tpl = new templates(); $alert = $tpl->_ENGINE_parse_body('{ERROR_NO_PRIVS}'); echo "alert('{$alert}');"; die; } if (isset($_GET["categories"])) { categories(); exit; } if (isset($_GET["category-search"])) { categories_search(); exit; } if (isset($_GET["add-perso-cat-js"])) { add_category_js(); exit; } if (isset($_GET["add-perso-cat-popup"])) { add_category_popup(); exit; } if (isset($_POST["category_text"])) {
function categories($parent) { global $calendarItems2; foreach ($calendarItems2 as $api) { if ($api->ParentCategoryId == $parent) { echo "<input type='checkbox' class='category' id='category" . $api->CategoryId . "' onclick='showHide(\"parentCategory" . $api->CategoryId . "\");categoryFilter(\"" . $api->CategoryId . "\");'><label for='category" . $api->CategoryId . "'>" . $api->Name . "</label><br>"; echo "<div id='parentCategory" . $api->CategoryId . "' class='invisible' style='padding-left:20px'>"; echo "<ul>"; categories($api->CategoryId); echo "</ul>"; echo "</div>"; } } }
<?php } ?> </div> </div> </div> <div class="col-md-4"> <h1>Categories:</h1> <ul style="list-style-type: none;"> <?php while (categories()) { ?> <li> <a href="<?php echo category_url(); ?> " title="<?php echo category_description(); ?> "> <?php echo category_title(); ?> <span><?php echo category_count(); ?>
function get_contest_category($catid) { $categories = categories(); foreach ($categories as $category) { if ($category['categoryid'] == $catid) { return $category['catname']; } } return ''; }