} else { $mailstatus = @mail($emailstonotify, $var_subject, $var_body, $headers); } } } $message = true; $infomessage = MESSAGE_RECORD_ADDED_SUCCESSFULLY; $flag_msg = 'class="msg_success"'; $var_kbtitle = ""; $var_kbdesc = ""; $var_kbmetatagkeyword = ""; $var_kbmetatagdescription = ""; } } elseif ($_POST["postback"] == "D") { if (!$error) { $catid = getCategoryId($var_id); $sql = "DELETE FROM sptbl_kb where nKBID='" . mysql_real_escape_string($var_id) . "'"; executeQuery($sql, $conn); updateCount($catid, "-"); //Insert the actionlog if (logActivity()) { $sql = "Insert into sptbl_actionlog(nALId,nStaffId,vAction,vArea,nRespId,dDate) Values('','{$var_staffid}','" . TEXT_DELETION . "','Knowledgebase','" . mysql_real_escape_string($var_id) . "',now())"; executeQuery($sql, $conn); } $var_catname = ""; $var_companyid = trim($_POST["cmbCompany"]); $var_departmentid = trim($_POST["cmbDepartment"]); $var_catid = $_POST["cmbCategory"]; $message = true; $infomessage = MESSAGE_KBENTRY_DELETED . "<br>"; $flag_msg = 'class="msg_success"';
function deleteEntry($id) { global $conn; global $var_staffid; $catid = getCategoryId($id); $sql = "DELETE FROM sptbl_kb where nKBID= {$id} "; executeQuery($sql, $conn); updateCount($catid, "-"); //Insert the actionlog if (logActivity()) { $sql = "Insert into sptbl_actionlog(nALId,nStaffId,vAction,vArea,nRespId,dDate) Values('','{$var_staffid}','" . TEXT_DELETION . "','Knowledgebase','" . mysql_real_escape_string($id) . "',now())"; executeQuery($sql, $conn); } }
><a href="searchresult.php?cat=<?php echo $row['category_name']; if (isset($_GET['s_string'])) { echo '&s_string=' . $_GET['s_string']; } ?> "><?php echo $row['category_name']; ?> </a></li> <?php } ?> <li class="nav-header">Subcategories</li> <?php $cid = getCategoryId($_GET['cat']); if ($cid != "") { ?> <li <?php if ($_GET['subcat'] == 'all' || !isset($_GET['subcat'])) { echo "class='active'"; } ?> ><a href="searchresult.php?cat=<?php echo $_GET['cat']; ?> &subcat=all<?php if (isset($_GET['s_string'])) { echo '&s_string=' . $_GET['s_string']; }
$game = getGameFromCache($game_id); if (!$game) { header('Location: ' . $baseurl); exit; } if ($user_coins < $game['g_coinPerBet'] and !$game['g_isTrial']) { $disable_betting = true; $notice .= $lang[226]; // you have less than minimum coins... $notice_display = "block"; $notice_class = 'needcoins'; } $game_timer = $game['g_schedTo']; $game_tags = $game['g_tags']; $game_cat = $game['g_categories' . $suffix]; $game_cat_id = getCategoryId($game['g_categories']); // if game has started if ($game['g_schedFrom'] <= $time and $game['g_isCancelled'] == 0 and $game['g_isClosed'] == 0) { // if user is logged in if ($user_id) { $user_bettings = getUserBets($game_id, $user_id); if ($user_bettings) { $notice .= $lang[227]; $notice_display = "block"; $notice_class = "joined"; $include_bet_status = true; } } $display_uri = $user_bettings ? "?q=yourgame&cat={$game_cat}&sort=time" : "?q=live&cat={$game_cat}&sort=time"; } // if game has not yet started
/** * How to display the widget on the screen. */ function widget($args, $instance) { // Widget output extract($args); /* Our variables from the widget settings. */ $title = $instance['title']; $postPerPage = $instance['post_per_page']; $title = $title == "" ? "Categories" : $title; $postPerPage = $postPerPage == "" ? 7 : $postPerPage; /* Before widget (defined by themes). */ echo $before_widget; $blogCategoryId = getCategoryId('blog'); $args = array('type' => 'blog', 'child_of' => $blogCategoryId, 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => 0, 'hierarchical' => 0, 'exclude' => '0'); $categoryPerPage = $postPerPage; $arrCategory = get_categories($args); $categoryCount = count($arrCategory); $count = 1; if ($arrCategory != NULL) { if ($categoryCount > $postPerPage) { $count = (int) ($categoryCount / $categoryPerPage); } $count += $categoryCount % $categoryPerPage > 0 ? 1 : 0; ?> <div class="categoriesWidget"> <h3><?php echo $title; ?> </h3> <div id='mySwipe' class='swipe'> <div class='swipe-wrap'> <?php for ($i = 0; $i < $count; $i++) { $adder = $count > 1 ? $i * $categoryPerPage : 0; echo "<ul>"; for ($j = 0; $j < $categoryPerPage; $j++) { $index = $j + $adder; if ($index < $categoryCount) { ?> <li><a class="contestName" href="<?php echo get_category_link($arrCategory[$index]->term_id); ?> "><i></i><?php echo $arrCategory[$index]->cat_name; ?> </a></li> <?php } } echo "</ul>"; } ?> </div> <?php if ($count > 1) { ?> <div id="categoryNav" class="swipeNavWrapper"> <?php for ($i = 0; $i < $count; $i++) { $active = $i == 0 ? "on" : ""; ?> <a id="swipeNav<?php echo $i; ?> " href="javascript:;" class="<?php echo $active; ?> "> </a> <?php } ?> </div> <?php } ?> </div> </div> <!-- /.categories--> <?php } ?> <?php /* After widget (defined by themes). */ echo $after_widget; }
} else { $message = 'An error occurred'; } } } } else { if (isset($_GET['id'])) { $filmData = getFilmData(trim($_GET['id']), $pdo); } else { if (isset($_GET['fromimdb'])) { require_once 'vendor/autoload.php'; $imdbData = \Jleagle\Imdb\Imdb::retrieve(trim($_GET['fromimdb'])); $filmData['fil_titre'] = $imdbData->title; $filmData['fil_annee'] = $imdbData->year; $filmData['fil_affiche'] = $imdbData->poster; $filmData['cat_id'] = getCategoryId(mb_substr($imdbData->genre, 0, mb_strpos($imdbData->genre, ',')), $pdo); $filmData['fil_description'] = $imdbData->plot; $filmData['fil_acteurs'] = $imdbData->actors; } } } $year = date('Y'); $categories = getAllCategories($pdo); $title = 'GCFL - Add a film'; require_once 'inc/header.php'; ?> <main> <fieldset> <output><?php echo $message; ?>