function loadApps() { $db = new FQuery(); $db->connect(); $qr = null; //set $qr to null value $view = app_param('app'); if (isset($_GET['theme']) and $_GET['theme'] == 'module' and $_SESSION['USER_LEVEL'] > 3) { $view = ''; } $sql = $db->select(FDBPrefix . 'apps', '*', "folder='app_{$view}'"); mysql_fetch_array($sql); if (mysql_affected_rows() != 0) { $sql2 = $db->select(FDBPrefix . 'menu', '*', "id=" . Page_ID); $qrs = @mysql_fetch_array($sql2); $theme = siteConfig('site_theme'); $tfile = "themes/{$theme}/apps/app_{$view}/index.php"; $file = "apps/app_{$view}/index.php"; if (file_exists($file)) { if (_FEED_ != 'rss') { echo '<div class="apps' . $qrs["class"] . $qrs["class"] . '">'; } if (!empty($qrs['title']) and $qrs['show_title']) { define("Apps_Title", "{$qrs['title']}"); } if ($qrs['show_title']) { if (!defined('Apps_Title')) { define("Apps_Title", "{$qrs['name']}"); } } if (_FEED_ != 'rss') { echo '<div class="main_apps">'; } if (file_exists($tfile)) { include $tfile; } else { if (file_exists($file)) { include $file; } } if (_FEED_ != 'rss') { echo ' </div></div>'; } } } else { if (isset($_GET['theme']) and $_GET['theme'] == 'module' and $_SESSION['USER_LEVEL'] < 3) { echo "<div style='border: 2px solid #e3e3e3; background: rgba(250,250,250,0.8);\tcolor :#aaa; \n\t\tpadding: 30px; text-align: center; margin: 5px 3px; font-weight: bold;'>Main Content</div>"; } else { $lang = siteConfig('lang'); echo '<div class="apps' . $qr["class"] . '">' . _404_ . '</div><p>'; $file = "modules/mod_search/mod_search.php"; if (file_exists($file)) { include $file; } echo '</p>'; loadModule('404'); } } }
function update($a, $b) { $db = new FQuery(); $db->connect(); $qr = $db->update(FDBPrefix . "comment_setting", array('value' => "{$b}"), "name='{$a}'"); if ($qr) { return true; } }
function option_sub_cat($parent_id, $cat, $pre) { $db = new FQuery(); $sql = $db->select(FDBPrefix . "article_category", "*", "parent_id={$parent_id} AND id!={$_REQUEST['id']}"); while ($qr = mysql_fetch_array($sql)) { $s = multipleSelected($cat, $qr['id']); echo "<option value='{$qr['id']}' {$s}>{$pre} |_ {$qr['name']}</option>"; option_sub_cat($qr['id'], $cat, $pre . " "); } }
function valmonth($x) { $x = substr($x, 0, 7); $val = 0; $db = new FQuery(); $db->connect(); $sql = $db->select(FDBPrefix . 'statistic', '*'); while ($qr = mysql_fetch_array($sql)) { $month = substr($qr['time'], 0, 7); if ($month == $x) { $val++; } } return $val; }
function option_sub_menu($parent_id, $sub = NULL, $pre) { $db = new FQuery(); $db->connect(); if ($_POST['id']) { $eid = "AND id!={$_POST['id']}"; } else { $eid = ''; } $sql = $db->select(FDBPrefix . "menu", "*", "parent_id={$parent_id} {$eid}"); while ($qr = mysql_fetch_array($sql)) { if ($sub == $qr['id']) { $s = "selected"; } else { $s = ""; } echo "<option value='{$qr['id']}' {$s}>{$pre}|_ {$qr['name']}</option>"; option_sub_menu($qr['id'], $sub, $pre . " "); } }
<?php /** * @version 1.5.0 * @package Fiyo CMS * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt * @description **/ define('_FINDEX_', 1); require_once '../../../system/jscore.php'; $db = new FQuery(); $db->connect(); $online = angka(FQuery('statistic_online')); $total = angka(FQuery('statistic')); $dtf = date('Y-m-d 00:00:00'); $today = angka(FQuery('statistic', "time >= '{$dtf}'", "", "", "time ASC")); $dtf = date('Y-m-d 00:00:00', strtotime("-1 Months")); $month = angka(FQuery('statistic', "time >= '{$dtf}'", "", "", "time ASC")); $timer = time() - 300; $db->delete(FDBPrefix . 'statistic_online', "time < {$timer}"); echo "\n{ \"today\":\"{$today}\" , \"month\":\"{$month}\", \"total\":\"{$total}\", \"online\":\"{$online}\" }";
<?php /** * @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE. **/ define('_FINDEX_', 1); session_start(); if (!isset($_SESSION['USER_LEVEL']) and $_SESSION['USER_LEVEL'] > 2) { die; } require_once '../../../system/jscore.php'; $db = new FQuery(); $db->connect(); if (isset($_GET['type'])) { if ($_GET['type'] == 'database') { @unlink("../../../../.backup/{$_GET['file']}"); if (!file_exists('../../../../.backup')) { mkdir('../../../../.backup'); } $date = md5(date("Ymd:His")); $file = "db-backup-{$date}"; $c = backup_tables("*", '../../../../.backup', "{$file}", true); if ($c) { $size = format_size(filesize("../../../../.backup/{$file}.sql")); $time = date("Y/m/d H:i:s", filemtime("../../../../.backup/{$file}.sql")); $r = "{$size} - {$time}"; echo "{ \"file\":\"{$file}.sql\" , \"info\":\"{$r}\" }"; }
if (isset($_POST['step_-1'])) { $_SESSION['success'] = ""; $_SESSION['host'] = ""; } if (isset($_POST['step_2'])) { if (!empty($_POST['site']) or !empty($_POST['username']) or !empty($_POST['email']) or !empty($_POST['userpass'])) { $nama_file = "system/installer/data.sql"; $open_file = @fopen($nama_file, "a+"); if ($open_file) { while (!feof($open_file)) { $data = fgets($open_file, 50); @($file .= $data); } require '_config.php'; require 'system/query.php'; $db = new FQuery(); $db->connect(); $mod = explode("--", $file); $go = null; foreach ($mod as $val) { $val = str_replace("db_prefix_", FDBPrefix, $val); $val = str_replace("_site_title", "{$_POST['site']}", $val); $val = str_replace("_site_desc", "{$_POST['desc']}", $val); $go = $db->query("{$val}"); } fclose($open_file); } if ($go) { notice('success', "SQL Query successfully!", 3); refresh(); }
<?php /** * @name Comment * @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt */ defined('_FINDEX_') or die('Access Denied'); $db = new FQuery(); $db->connect(); $sql = $db->select(FDBPrefix . 'comment', '*', "link='{$link}' AND status=1", "date ASC"); $count = mysql_affected_rows(); if ($count != 0) { if (siteConfig('lang') == 'id') { $count = "{$count} Komentar"; } else { if ($count < 2) { $count = "{$count} Comment"; } else { $count = "{$count} Comments"; } } ?> <script> $(function() { var hash = $('.cmn-gravatar[data-gravatar-hash]').attr('data-gravatar-hash'); $.ajax({ url: 'http://gravatar.com/avatar/'+ hash +'?size=48' ,
function option_sub_cat($parent_id, $pre) { $db = new FQuery(); $db->connect(); $sql = $db->select(FDBPrefix . "article_category", "*", "parent_id={$parent_id} AND id!={$_REQUEST['id']}"); while ($qr = mysql_fetch_array($sql)) { //select article 'info'rmation $sql2 = $db->select(FDBPrefix . 'article', '*', "id={$_REQUEST['id']}"); $at = mysql_fetch_array($sql2); //select article category 'info'rmation $sql3 = $db->select(FDBPrefix . 'article_category', '*', "id={$_REQUEST['id']}"); $pd = mysql_fetch_array($sql3); if ($pd['parent_id'] == $qr['id'] or $at['category'] == $qr['id']) { $s = "selected"; } else { $s = ""; } echo "<option value='{$qr['id']}' {$s}>{$pre} |_ {$qr['name']}</option>"; option_sub_cat($qr['id'], $pre . " "); } }
function loadModuleCss() { if (isset($_GET['theme']) and $_GET['theme'] == 'module' and $_SESSION['USER_LEVEL'] < 3) { echo "<style>.theme-module {\n\t\tborder: 2px solid #e3e3e3; \n\t\tbackground: rgba(250,250,250,0.8);\n\t\tcolor : #666; \n\t\tpadding: 10px;\n\t\tmargin: 5px 3px;\n\t\tfont-weight: bold;\n\t\tcursor: pointer;\n\t\ttransition: all .2s ease;\n\t\t}\n\t\t.theme-module:hover {\n\t\tborder-color: #ff9000; \n\t\tbackground: rgba(255, 205, 130,0.15);\n\t\tcolor : #ff6100;\n\t\tbox-shadow: 0 0 10px #ffcd82;} </style>"; } else { $db = new FQuery(); $db->connect(); if (!defined('Page_ID') and $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] == FUrl) { $sql = $db->select(FDBPrefix . 'menu', '*', 'home=1'); $qr = mysql_fetch_array($sql); $pid = $qr['id']; } else { $pid = Page_ID; if (empty($pid)) { $pid = 0; } } $val = false; $no = 1; $qrs = $db->select(FDBPrefix . 'module', '*', "status=1 " . Level_Access, 'short ASC'); while ($qr = mysql_fetch_array($qrs)) { if (!empty($qr['page'])) { $pid = explode(",", $qr['page']); foreach ($pid as $a) { if ($a == Page_ID) { $file = "modules/{$qr['folder']}/mod_style.php"; if (file_exists($file)) { if ($no > 1) { echo "\t"; } require_once $file; echo "\n"; $no++; } } } } } } }
$v = FQuery('statistic', "time BETWEEN '{$dtf}' AND '{$dts}'", "", "", "time ASC"); if (empty($v)) { $allVisitor .= 0; } else { $allVisitor .= $v; } if ($x != 0) { $allVisitor .= ","; } } $z = 0; for ($x = $d14; $x >= 0; $x--) { $ytf = date('Y-m-d 00:00:00', strtotime("-{$x} days")); $t = $x - 1; $dtf = date('Y-m-d 00:00:00', strtotime("-{$t} days")); $db = new FQuery(); $db->connect(); $sql = $db->select(FDBPrefix . "statistic", "*,COUNT(DISTINCT ip) AS q", "time < '{$dtf}'", "time ASC"); $row = mysql_fetch_array($sql); $unique = $row['q'] - $z; if ($unique < 0) { $unique = 0; } $z = $row['q']; if (empty($unique)) { $uniqueVisitor .= 0; } else { if ($x != $d14) { $uniqueVisitor .= $unique; } }
<?php /** * @version 1.5.0 * @package Fiyo CMS * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt * @description Article Editor **/ session_start(); if ($_SESSION['USER_LEVEL'] <= 4) { define('_FINDEX_', 1); require_once '../../../system/jscore.php'; $db = new FQuery(); $db->connect(); if (isset($_POST['art_title']) and !empty($_POST['art_title'])) { $title = $_POST['art_title']; $title = str_replace('"', "'", $title); $qr = $db->update(FDBPrefix . 'article', array("title" => "{$title}", "editor" => $_SESSION['USER_ID']), "id={$_POST['id']}"); if (@$qr) { echo "Saved"; } else { echo "Failed!"; } } if (isset($_POST['_content_article']) and !empty($_POST['_content_article'])) { $article = str_replace('"', "'", "{$_POST['_content_article']}"); if (checkLocalhost()) { $flocal = $_POST['flocal']; $article = str_replace("http://localhost/{$flocal}", "/", $article); }
function multipleDelete($table, $source, $item = null, $cat = null, $except = null, $sub = null) { $db = new FQuery(); $del = explode(",", $source); if (!isset($except)) { $except = null; } else { $except = $except; } if (!empty($cat)) { $cat = $fid = $cat; } else { $cat = 'category'; $fid = 'id'; } if (isset($source)) { foreach ($del as $id) { if (!empty($item)) { if (!empty($except)) { $art = $db->select(FDBPrefix . "{$item}", '*', "{$except} AND {$cat} ='{$id}'"); } else { $art = $db->select(FDBPrefix . "{$item}", '*', "{$cat} ='{$id}'"); } if (@mysql_num_rows($art) > 0) { $noempty = 1; break; } if (!isset($noempty)) { if (!empty($sub)) { if (!oneQuery($table, 'parent_id', $id)) { $qr = $db->delete(FDBPrefix . $table, "{$fid}='{$id}'"); } else { $noempty = 1; } } else { $qr = $db->delete(FDBPrefix . $table, "{$fid}='{$id}'"); } } else { $noempty = 1; } } else { if (isset($sub)) { if (!oneQuery($table, 'parent_id', $id)) { $qr = $db->delete(FDBPrefix . $table, "{$fid}='{$id}'"); } else { $noempty = 1; } } else { $qr = $db->delete(FDBPrefix . $table, "{$fid}='{$id}'"); } } } } if (isset($qr)) { return 1; } else { if (isset($noempty)) { return 'noempty'; } else { return null; } } }
<?php /** * @version Beta 1.0 * @package Fiyo CMS * @copyright Copyright (C) 2011 Fiyo CMS. * @license GNU/GPL, see liCENSE.php * @description mengolah data JQuery untuk mendapatkan nilai dari kategori **/ $cat = $_GET[cat]; $vw = $_GET[view]; require '../../config.php'; require '../../system/query.php'; $db = new FQuery(); $db->connect(); $db->select('app_store_category', '*', "id='{$cat}'"); $qr = $db->getResult(); echo "?app=app_store&cat={$qr['id']}&view={$vw}";
<input type="checkbox" id="checkall" target="check[]"></th> <th style="width:20% !important;"><?php echo Group_name; ?> </th> <th style="width:10% !important; text-align: center;">Level</th> <th style="width:60% !important;"><?php echo Description; ?> </th> <th style="width:5% !important;text-align: center;">ID</th> </tr> </thead> <tbody> <?php $db = new FQuery(); $db->connect(); $sql = $db->select(FDBPrefix . 'user_group', '*', '', 'level ASC'); $no = 1; while ($qr = mysql_fetch_array($sql)) { $checkbox = null; if ($qr['level'] != 1 and $qr['level'] != 2 and $qr['level'] != 3) { $checkbox = "<input type='checkbox' name='check[]' value='{$qr['level']}'>"; } else { $checkbox = "<span class='icon lock'></lock>"; } $name = "<a class='tips' title='" . Edit . "' data-placement='right' href='?app=user&view=group&act=edit&id={$qr['id']}'>{$qr['group_name']}</a>"; if ($_SESSION['USER_LEVEL'] > 2) { $checkbox = "<span class='icon lock'></lock>"; $name = "{$qr['group_name']}"; }
* @package Comments * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt **/ defined('_FINDEX_') or die('Access Denied'); $name = mod_param('name', $modParam); $date = mod_param('date', $modParam); $text = mod_param('text', $modParam); $item = mod_param('item', $modParam); $title = mod_param('title', $modParam); $scomment = mod_param('comment', $modParam); $gravatar = mod_param('gravatar', $modParam); if ($item == "" or empty($item)) { $item = 5; } $db = new FQuery(); $db->connect(); $sql = $db->select(FDBPrefix . 'comment', '*', "status=1", "date DESC"); $no = 0; while ($com = mysql_fetch_array($sql) and $no < $item) { $email = strtolower($com['email']); $email = md5($email); $img = "<span class='mod-gravatar' data-gravatar-hash='{$email}'></span>"; if ($com['user_id'] == 1 or $com['user_id'] == 2) { $s = " admin-comment"; } else { $s = ""; } echo "<div class='inner-comment{$s}'>"; if ($gravatar) { echo "<div class='mod-avatar-comment'>{$img}</div>";
} ?> " style="min-width: 83.5%" size="18"></td> </tr> <tr> <td class="row-title" title="<?php echo Editor_level_tip; ?> " style="width:30%"><?php echo Editor_Level; ?> </td> <td><select name="param12" placeholder=""> <option value=""></option> <?php $db = new FQuery(); $db->connect(); $sql = $db->select(FDBPrefix . 'user_group', '*', 'level >= ' . USER_LEVEL); while ($qrs = mysql_fetch_array($sql)) { if ($qrs['level'] == 3 and !$editor_level) { echo "<option value='{$qrs['level']}' selected>{$qrs['group_name']}</option>"; } else { if ($qrs['level'] == $editor_level) { echo "<option value='{$qrs['level']}' selected>{$qrs['group_name']}</option>"; } else { echo "<option value='{$qrs['level']}'>{$qrs['group_name']}</option>"; } } } ?> </select>
function option_sub_menu($parent_id, $sub = null, $pre = null, $page) { $db = new FQuery(); $db->connect(); $sql = $db->select(FDBPrefix . "menu", "*", "parent_id={$parent_id}"); while ($qr = mysql_fetch_array($sql)) { $sel = multipleSelected($page, $qr['id']); if ($sel == 'selected') { $sel = "class='active' checked"; } $check = "<input {$sel} type='checkbox' name='page[]' value='{$qr['id']}' rel='ck'>"; echo "<li value='{$qr['id']}' {$sel}>{$pre} |_ {$check} {$qr['name']}</li>"; option_sub_menu($qr['id'], $sub + 1, " " . $pre . " ", $page); } }
<?php /** * @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE. **/ define('_FINDEX_', 1); session_start(); if (!isset($_SESSION['USER_LEVEL']) and $_SESSION['USER_LEVEL'] > 2) { die; } require_once '../../../system/jscore.php'; $db = new FQuery(); $db->connect(); /****************************************/ /* Article Front Page */ /****************************************/ if (isset($_GET['fp'])) { if ($_GET['fp'] == '1') { $db->update(FDBPrefix . 'article', array("featured" => "1"), 'id=' . $_GET['id']); alert('success', Status_Applied, 1); } if ($_GET['fp'] == '0') { $db->update(FDBPrefix . 'article', array("featured" => "0"), 'id=' . $_GET['id']); alert('success', Status_Applied, 1); } } /****************************************/ /* Enable and Disbale Article */
/** * @version 1.5.0 * @package Article Tags * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt */ defined('_FINDEX_') or die('Access Denied'); $height = mod_param('height', $modParam); $thumbW = mod_param('thumbW', $modParam); $thumbH = mod_param('thumbH', $modParam); $limit = mod_param('limit', $modParam); $limitd = mod_param('limit', $modParam) + 10; $filter = mod_param('filter', $modParam); $cat = mod_param('cat', $modParam); $showImg = mod_param('showImg', $modParam); $db = new FQuery(); $level = Level_Access; $tags = ''; $sql = $db->select(FDBPrefix . "article", 'tags', "status = 1 AND tags != '' {$level}", "RAND() LIMIT 50"); while ($tag = mysql_fetch_array($sql)) { $tags .= $tag['tags'] . ","; } $tagz = explode(",", $tags); sort($tagz); $tags = $tagb = null; foreach ($tagz as $tag) { $size = rand(1, 4); $link = str_replace(" ", "-", "?app=article&tag={$tag}"); $link = make_permalink($link); $ltag = strtolower($tag); if (!empty($tag) and $tag != $tagb) {
<tr> <th style="width:1% !important;" class="no" colspan="0" id="ck"> <input type="checkbox" id="checkall" target="check_tag[]"></th> <th style="width:89% !important;"><?php echo Tags; ?> </th> <th style="width:10% !important; text-align:center"><?php echo Hits; ?> </th> </tr> </thead> <tbody> <?php $db = new FQuery(); $db->connect(); $sql = $db->select(FDBPrefix . 'article_tags'); $no = 1; while ($qr = mysql_fetch_array($sql)) { $checkbox = "<input type='checkbox' data-name='rad-{$qr['id']}' sub-target='.sub-menu' name='check_tag[]' value='{$qr['id']}' rel='ck'>"; $name = "<a class='tips' title='" . Edit . "' data-placement='right' href='?app=article&view=tag&act=edit&id={$qr['id']}'>{$qr['name']}</a>"; echo "<tr>"; echo "<td align='center'>{$checkbox}</td><td>{$name}</td><td align='center'>{$qr['hits']}</td>"; echo "</tr>"; $no++; } ?> </tbody> </table> </form>
if ($qr and isset($_POST['apply_group'])) { notice('success', Group_Saved); redirect(getUrl()); } else { notice('error', Status_Fail); } } } else { notice('error', Status_Invalid); } } /****************************************/ /* Add New contact */ /****************************************/ if (isset($_POST['save_add']) or isset($_POST['apply_add'])) { $db = new FQuery(); $db->connect(); if (!empty($_POST['name']) and !empty($_POST['gender']) and !empty($_POST['group'])) { $qr = $db->insert(FDBPrefix . 'contact', array("", "{$_POST['name']}", "{$_POST['gender']}", "{$_POST['email']}", "{$_POST['address']}", "{$_POST['city']}", "{$_POST['state']}", "{$_POST['country']}", "{$_POST['zip']}", "{$_POST['phone']}", "{$_POST['fax']}", "{$_POST['job']}", "{$_POST['photo']}", "{$_POST['web']}", "{$_POST['ym']}", "{$_POST['fb']}", "{$_POST['tw']}", "{$_POST['desc']}", "{$_POST['group']}", 1)); if ($qr and isset($_POST['apply_add'])) { $sql = $db->select(FDBPrefix . 'contact', 'id', '', 'id DESC'); $qr = mysql_fetch_array($sql); notice('success', Contact_Saved); redirect('?app=contact&act=edit&id=' . $qr['id'], 2); } elseif ($qr and isset($_POST['save_add'])) { notice('success', Contact_Saved); redirect('?app=contact', 2); } else { notice('error', Status_Fail); } } else {
function category($id, $menuId, $fp = null) { //validation page type $categoryName = $categoryDesc = null; $label = app_param('label'); if ($id > 0) { $flag = FQuery("pustaka_category", "id={$id}", '', 1); } else { if (!empty($label)) { $label = app_param('label'); $label = str_replace("-", " ", $label); $label = "AND tags LIKE '%" . $label . "%' "; } $flag = true; } //if page type is valid if ($flag) { $db = new FQuery(); $db->connect(); /************** Parameter Page ***************/ $per_page = 10; $categoryId = $id; if (empty($param)) { $show_panel = 1; $per_page = 10; } if (url_param('feed') == 'rss') { $per_page = 10; $pages = url_param('page'); if ($pages != null) { $link = str_replace("?page={$pages}", "", getUrl()); redirect("{$link}?feed=rss"); } } if (isset($label)) { $per_page = 10; } if (empty($per_page)) { $per_page = 10; } //$fp is default page if (!isset($fp) and !isset($label)) { $categoryName = oneQuery('pustaka_category', 'id', $categoryId, 'name'); $categoryDesc = oneQuery('pustaka_category', 'id', $categoryId, 'description'); } $level_access = Level_Access; //$if category id is not found if (!$categoryId and !isset($fp) and !isset($label)) { echo pustaka_Page_Notfound; } else { if (isset($categoryName)) { $whereCat = "AND category = {$categoryId}"; } else { $whereCat = null; } //call paging class loadPaging(); $paging = new paging(); $rowsPerPage = $per_page; //paging results $result = $paging->pagerQuery(FDBPrefix . 'pustaka_file', "*", "status=1 {$whereCat} {$label}", 'id DESC', $rowsPerPage); $no = 0; //count rows $jml = mysql_affected_rows(); while ($qr = mysql_fetch_array($result)) { /********** File Author ***********/ $author = $qr['author']; /********** File Category ***********/ $catlink = categoryLink($qr['category']); $category = oneQuery('pustaka_category', 'id', $qr['category'], 'name'); $category = "<a href='{$catlink}' title='See more {$category}'>{$category}</a>"; /********** pdf Link ***********/ $flink = "?app=pdf&view=item&id={$qr['id']}"; $link = make_permalink($flink, Page_ID); $title = "<a href='{$link}'>{$qr['title']}</a>"; /********** File Labels ***********/ $labels = labelToLink($qr['tags']); /********** File Compability ***********/ $this->perrows = $jml; $this->show_panel = $show_panel; $this->category[$no] = $category; $this->catlink[$no] = $catlink; $this->author[$no] = $author; $this->title[$no] = $title; $this->link[$no] = $link; $this->labels[$no] = $labels; $this->date[$no] = $qr['year']; $this->hits[$no] = $qr['hits']; $this->desc[$no] = $qr['description']; if (url_param('feed') == 'rss' and url_param('feed') == 'rss' or app_param('label')) { $this->description[$no] = $qr['description']; } if (defined('SEF_URL')) { $link = link_paging('?'); } else { if (checkhomepage()) { $link = "?"; } else { $link = "?app=pdf&view=category&id={$categoryId}"; $link = make_permalink($link, Page_ID); $link = $link . "&"; } } $no++; } if ($no == 0) { echo "<h1 style='margin:20px auto'>Pustaka Kosong !!!!</h1>"; } //start paging links $db->select(FDBPrefix . 'pustaka_file', '*', "status=1 {$whereCat} {$level_access}"); $jml = mysql_affected_rows(); if ($jml > $rowsPerPage) { $pagelink = $paging->createPaging($link); } else { $pagelink = null; } //send paging var relsult $this->pglink = $pagelink; //if parameter found rss page if (url_param('feed') == 'rss' and url_param('feed') == 'rss' or app_param('label')) { $this->catName = $categoryName; $this->catDesc = $categoryDesc; } } } else { pustaka_Page_Notfound; } }
<?php /** * @version 1.5.0 * @package Fiyo CMS * @copyright Copyright (C) 2012 Fiyo CMS. * @license GNU/GPL, see license.txt * @description **/ defined('_FINDEX_') or die('Access Denied'); // Access only for Administrator if ($_SESSION['USER_LEVEL'] > 2) { redirect('index.php'); } $db = new FQuery(); $db->connect(); if (isset($_POST['themes_submit'])) { if (empty($_POST['folder_themes'])) { alert('error', Please_select_theme); } else { $qr = $db->update(FDBPrefix . 'setting', array('value' => "{$_POST['folder_themes']}"), "name='site_theme'"); if ($qr) { alert('info', Theme_successfully_applied); } } } if (isset($_POST['themes_files'])) { if (empty($_POST['folder_themes'])) { alert('error', Please_select_theme); } else { $thm = $_POST['folder_themes'];
<?php /** * @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE. **/ define('_FINDEX_', 1); session_start(); if (!isset($_SESSION['USER_LEVEL']) and $_SESSION['USER_LEVEL'] > 2) { die; } require_once '../../../system/jscore.php'; $db = new FQuery(); $db->connect(); /****************************************/ /* Enable and Disbale User */ /****************************************/ if (isset($_GET['stat'])) { if ($_GET['stat'] == '1') { $db->update(FDBPrefix . 'user', array("status" => "1"), 'id=' . $_GET['id']); alert('success', Status_Applied, 1); } if ($_GET['stat'] == '0') { $db->update(FDBPrefix . 'user', array("status" => "0"), 'id=' . $_GET['id']); $db->delete(FDBPrefix . 'session_login', 'user_id=' . $_GET['id']); alert('success', Status_Applied, 1); } if ($_GET['stat'] == 'kick') { $db->delete(FDBPrefix . 'session_login', 'user_id=' . $_GET['id']);
?> </th> <th style="width:40% !important;"class='hidden-xs'><?php echo Description; ?> </th> <th style="width:15% !important;text-align: center;" class='hidden-xs'>Total <?php echo Menu; ?> </th> <th style="width:5% !important; text-align: center;" class='hidden-xs' >ID</th> </tr> </thead> <tbody> <?php $db = new FQuery(); $db->connect(); $level = Level_Access; $sql = $db->select(FDBPrefix . 'menu_category', '*', SQL_USER_LEVEL); $no = 1; while ($qr = mysql_fetch_array($sql)) { $qr2 = $db->select(FDBPrefix . 'menu', '*', "category='{$qr['category']}'"); $jml2 = mysql_affected_rows(); $checkbox = "<input type='checkbox' name='check[]' value='{$qr['category']}' rel='ck'>"; $name = "<a data-placement='right' class='tips' title='" . Edit . "' href='?app=menu&view=edit_category&id={$qr['id']}'>{$qr['title']}</a>"; echo "<tr>"; echo "<td align='center'>{$checkbox}</td><td><span class='visible-xs right'>{$jml2} item</span>{$name}</td><td class='hidden-xs hidden-sm'>{$qr['category']}</td><td class='hidden-xs'>{$qr['description']}</td><td align='center' class='hidden-xs'>{$jml2}</td><td align='center' class='hidden-xs'>{$qr['id']}</td>"; echo "</tr>"; $no++; } ?>
* @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt **/ define('_FINDEX_', 1); session_start(); if (!isset($_SESSION['USER_ID']) or !isset($_SESSION['USER_ID']) or $_SESSION['USER_LEVEL'] > 3 or !isset($_POST['url'])) { die; } require_once '../../../system/jscore.php'; ?> <table class="table tools"> <tbody> <?php $db = new FQuery(); $db->connect(); $sql = $db->select(FDBPrefix . "article", "*,DATE_FORMAT(date,'%W, %b %d %Y') as dates", "", 'date DESC LIMIT 10'); $no = 1; while ($qr = mysql_fetch_array($sql)) { $read = check_permalink("link", "?app=article&view=item&id={$qr['id']}", "permalink"); if ($read) { $read = $_POST['url'] . $read; } else { $read = $_POST['url'] . "?app=article&view=item&id={$qr['id']}"; } $edit = "?app=article&act=edit&id={$qr['id']}"; $auth = userInfo("name", "{$qr['author_id']}"); $info = "{$qr['date']}"; $read_article = Read; $edit_article = Edit;
<?php /** * @name Comment * @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt * @description **/ defined('_FINDEX_') or die('Access Denied'); $db = new FQuery(); $db->connect(); loadLang(__DIR__); if (!defined('SEF_URL')) { $link = check_permalink('link', getLink(), 'link'); $go_link = FUrl . getLink() . "&pid={$_GET['pid']}"; } else { $link = @check_permalink('permalink', $_REQUEST['link'], 'link'); $go_link = FUrl . @$_REQUEST['link'] . SEF_EXT; } require 'entry_comment.php'; define('CAPTCHA', false); if (!CAPTCHA) { $valid = true; if (!isset($_SESSION['captcha'])) { $_SESSION['captcha'] = 99; } $_POST['secure'] = $_SESSION['captcha']; $_SESSION['ENABLE_CAPTCHA'] = false; }
<?php /** * @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE. **/ defined('_FINDEX_') or die('Access Denied'); $db = new FQuery(); $db->connect(); $level = Level_Access; $sql = $db->select(FDBPrefix . 'menu_category', '*', "id={$_REQUEST['id']} {$level}"); $qr = mysql_fetch_array($sql); if (!$qr) { redirect('index.php'); } ?> <form method="post" id="form"> <div id="app_header"> <div class="warp_app_header"> <div class="app_title"><?php echo Edit_Category; ?> </div> <div class="app_link"> <button class="btn btn-success save" title="<?php echo Save; ?> " name="apply_category" type="submit" value="Save" ><i class="icon-ok"></i> <?php echo Save;