Example #1
0
 function save($info, $extra = NULL)
 {
     if (is_array($extra)) {
         $data = $extra;
     }
     $data['u2_title'] = $info['u2_title'];
     $data['u2_desp'] = $info['u2_desp'];
     $data['u2_uid'] = format_uid();
     $data['u2_nickname'] = _sess('u2_nickname');
     $data['u2_addtime'] = date("Y-m-d H:i:s");
     $data['u2_hit'] = 0;
     $data['u2_pic'] = $info['u2_pic'];
     if (check_active()) {
         $data['u2_is_active'] = 1;
     } else {
         $data['u2_is_active'] = 0;
     }
     $data['u2_cate'] = $info['cate'];
     $this->db->insert('u2_content', $data);
     $id = $this->db->insert_id();
     $type = _text('system_pro');
     $desc = '<a href="/riki/display/' . $id . '" target="_blank">' . $info['u2_title'] . '</a>';
     add_to_manager('u2_content', $id, $desc, $type, $data['u2_is_active']);
 }
Example #2
0
            exit;
        }
    } else {
        $acttpl = 'error';
        $tpl->assign('errormsg', $locale->get('category_error_category_noexists'));
        return;
    }
}
//sorrend modositas vege
/**
 * ha aktivalunk vagy inaktivalunk egy kategoriat
 */
if ($sub_act == "act") {
    if ($cid != 0) {
        include_once $include_dir . '/function.check.php';
        check_active('iShark_Classifieds_Category', 'category_id', $cid);
        //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;
    }
Example #3
0
        ?>
</td>
        <td><?php 
        echo check_uptime($item['uptime']);
        ?>
</td>
        <td><?php 
        echo check_value($item['version']);
        ?>
</td>
        <td><?php 
        echo check_connections(check_value($item['threads_connected']));
        ?>
</td>
        <td><?php 
        echo check_active(check_value($item['threads_running']));
        ?>
</td>
        <td><?php 
        echo check_value($item['bytes_received_persecond']);
        ?>
KB</td>
        <td><?php 
        echo check_value($item['bytes_sent_persecond']);
        ?>
KB</td>
        <td><?php 
        echo check_value($item['queries_persecond']);
        ?>
</td>
        <td><?php 
Example #4
0
    $acttpl = 'gallery_video';
}
// Galéria törlése
if ($sub_act == 'gdel') {
    $query = "\n\t\tDELETE FROM iShark_Galleries\n\t\tWHERE iShark_Galleries.gallery_id = {$gid}\n\t";
    $mdb2->exec($query);
    $query = "\n\t\tDELETE FROM iShark_Galleries_Pictures\n\t\tWHERE gallery_id = {$gid}\n\t";
    $mdb2->exec($query);
    logger($page . '_' . $sub_act);
    header('Location: admin.php?p=' . $module_name . '&act=' . $page);
    exit;
}
// Mappa aktiválás
if ($sub_act == 'act') {
    include_once 'includes/function.check.php';
    check_active('iShark_Galleries', 'gallery_id', $gid);
    logger($page . '_' . $sub_act);
    header('Location: admin.php?p=' . $module_name . '&act=' . $page);
    exit;
}
// Új mappa létrehozása/mappa módosítása
if ($sub_act == 'gadd' || $sub_act == 'gmod') {
    $javascripts[] = "javascript.contents";
    $titles = array('gadd' => $locale->get('video_title_gadd'), 'gmod' => $locale->get('video_title_gmod'));
    include_once 'HTML/QuickForm.php';
    require_once 'HTML/QuickForm/jscalendar.php';
    include_once 'HTML/QuickForm/Renderer/ArraySmarty.php';
    $form =& new HTML_Quickform('frm_gallery', 'post', 'admin.php?p=' . $module_name);
    $form->setRequiredNote($locale->get('video_form_required_note'));
    $form->addElement('header', 'header_vid', $locale->get('video_form_header_add'));
    $form->addElement('hidden', 'act', $page);
Example #5
0
        }
        header('Location: admin.php?p=' . $module_name . '&act=search&search=1&field=' . $field . '&ord=' . $ord . '&pageID=' . $page_id . '&name=' . $_REQUEST['name'] . '&user_name=' . $_REQUEST['user_name'] . '&rel=' . $_REQUEST['rel'] . '&email=' . $_REQUEST['email'] . '' . $group_get);
        exit;
    } else {
        header('Location: admin.php?p=' . $module_name . '&field=' . $field . '&ord=' . $ord . '&pageID=' . $page_id);
        exit;
    }
}
//torles vege
/**
 * ha aktivalunk egy felhasznalot
 */
if ($act == "act") {
    include_once $include_dir . '/function.check.php';
    $uid = intval($_REQUEST['uid']);
    check_active('iShark_Users', 'user_id', $uid);
    //beallitjuk az is_change mezot, innentol kezdve nem lehet fizikailag torolni a usert
    $query = "\n\t\tUPDATE iShark_Users \n\t\tSET is_change = '1' \n\t\tWHERE user_id = {$uid}\n\t";
    $mdb2->exec($query);
    //loggolas
    logger($act, '', '');
    if (isset($_REQUEST["s"]) && $_REQUEST["s"] == "1") {
        if (!empty($_REQUEST["group"])) {
            foreach ($_REQUEST["group"] as $gid) {
                $group_get .= "&group[]=" . $gid;
            }
        } else {
            $group_get = "";
        }
        header('Location: admin.php?p=' . $module_name . '&act=search&search=1&field=' . $field . '&ord=' . $ord . '&pageID=' . $page_id . '&name=' . $_REQUEST['name'] . '&user_name=' . $_REQUEST['user_name'] . '&rel=' . $_REQUEST['rel'] . '&email=' . $_REQUEST['email'] . '' . $group_get);
        exit;
Example #6
0
    // capture the array stucture
    ob_start();
    print_r($renderer->toArray());
    $tpl->assign('dynamic_array', ob_get_contents());
    ob_end_clean();
    //megadjuk a tpl file nevet, amit atadunk az admin.php-nek
    $acttpl = 'dynamic_form';
}
/**
 * ha aktivalunk vagy inaktivalunk egy aprohirdetest
 */
if ($sub_act == "act") {
    if (isset($_REQUEST['id']) && is_numeric($_REQUEST['id'])) {
        include_once $include_dir . '/function.check.php';
        $aid = intval($_REQUEST['id']);
        check_active('iShark_Classifieds_Advert', 'advert_id', $aid);
        //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=search&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('adverts_error_advert_noexists'));
        return;
    }
Example #7
0
    $tpl->assign('lang_title', $titles[$sub_act]);
    // capture the array stucture
    ob_start();
    print_r($renderer->toArray());
    $tpl->assign('dynamic_array', ob_get_contents());
    ob_end_clean();
    //megadjuk a tpl file nevet, amit atadunk az admin.php-nek
    $acttpl = 'dynamic_form';
}
/**
 * ha aktivaljuk vagy deaktivaljuk
 */
if ($sub_act == "act") {
    include_once $include_dir . '/function.check.php';
    $cid = intval($_GET['cid']);
    check_active('iShark_Category', 'category_id', $cid);
    //loggolas
    logger($page . '_' . $sub_act);
    header('Location: admin.php?p=' . $module_name . '&act=' . $page . '&field=' . $field . '&ord=' . $ord . '&pageID=' . $page_id);
    exit;
}
//aktivalas, deaktivalas vege
/**
 * ha torlunk egy rovatot
 */
if ($sub_act == "del") {
    $cid = intval($_REQUEST['cid']);
    $query = "\n\t\tUPDATE iShark_Category \n\t\tSET is_active  = 0, \n\t\t\tis_deleted = 1 \n\t\tWHERE category_id = {$cid}\n\t";
    $mdb2->exec($query);
    //loggolas
    logger($page . '_' . $sub_act);
Example #8
0
        $query = "\n\t\t\tDELETE FROM iShark_Builder_BoxContents\n\t\t\tWHERE box_id = {$bid}\n\t\t";
        $mdb2->exec($query);
        //loggolas
        logger($act, '', '');
    }
    header('Location: admin.php?p=' . $module_name);
    exit;
}
//torles vege
/**
 * ha aktivalunk vagy inaktivalunk egy menupontot
 */
if ($sub_act == "act") {
    include_once $include_dir . '/function.check.php';
    $rid = intval($_REQUEST['rid']);
    check_active('iShark_Rss', 'rss_id', $rid);
    //loggolas
    logger($act, '', '');
    header('Location: admin.php?p=' . $module_name);
    exit;
}
/**
 * ha pozíciót változtatunk
 */
if ($sub_act == "pos") {
    $bid = intval($_REQUEST['bid']);
    $way = $_REQUEST['way'];
    $query = "\n\t\tSELECT * \n\t\tFROM iShark_Builder_ColumnBox \n\t\tWHERE box_id = {$bid}\n\t";
    $result =& $mdb2->query($query);
    $row = $result->fetchRow();
    if ($way == 'up') {
Example #9
0
        $renderer =& new HTML_QuickForm_Renderer_ArraySmarty($tpl, true);
        $form_forum->accept($renderer);
        $tpl->assign('form_forum', $renderer->toArray());
        $acttpl = "forum_forum";
    }
    /**
     * Topic aktiválás 
     */
    if ($_REQUEST['act'] == 'act') {
        if (!check_perm('act', $menu_id, 1, 'forum', 'index') || !isset($_REQUEST['tid'])) {
            $acttpl = 'error';
            $tpl->assign('errormsg', $strForumErrorPermissionDenied);
            return;
        }
        include_once 'includes/function.check.php';
        check_active('iShark_Forum_Topics', 'topic_id', $tid);
        logger('act', $menu_id);
        header("Location: index.php?{$self}&parent={$parent}");
        exit;
    }
} else {
    if (check_perm('lst', $menu_id, 0, 'forum', 'index') === true) {
        $act_right = $parent > 0 && check_perm('act', $menu_id, 1, 'forum', 'index');
        $del_right = check_perm($parent > 0 ? 'del' : 'fdel', $menu_id, 1, 'forum', 'index');
        $whereClause = "AND FT.is_active='1' ";
        if (!isset($_SESSION['user_id'])) {
            $whereClause .= "AND FT.read_everybody='1'";
        }
        if (isset($_SESSION['user_id']) && $act_right) {
            $whereClause = "";
        }
Example #10
0
$tpl->assign('ordselect2', $ordselect2);
$tpl->assign('page_id', $page_id);
//rendezes vege
//jogosultsag ellenorzes
if (!check_perm($act, NULL, 1, 'modules')) {
    $acttpl = 'error';
    $tpl->assign('errormsg', $strErrorPermission);
    return;
}
/**
 * ha aktivaljuk valamelyik modult
 */
if ($act == "act") {
    include_once $include_dir . '/function.check.php';
    $mid = intval($_GET['m_id']);
    check_active('iShark_Modules', 'module_id', $mid);
    //loggolas
    logger($act, NULL, '');
    header('Location: admin.php?p=modules&field=' . $field . '&ord=' . $ord);
    exit;
}
//aktivalas vege
/**
 * ha telepitjuk valamelyik modult
 */
if ($act == "ins") {
    include_once $include_dir . '/function.check.php';
    $mid = intval($_GET['m_id']);
    check_install($mid, 'modules');
    //loggolas
    logger($act, '', '');
Example #11
0
        ?>
</td>
        <td><?php 
        echo check_uptime($item['uptime']);
        ?>
</td>
        <td><?php 
        echo check_value($item['version']);
        ?>
</td>
        <td><?php 
        echo check_connections(check_value($item['connections']));
        ?>
</td>
        <td><?php 
        echo check_active(check_value($item['active']));
        ?>
</td>
        <td><?php 
        echo check_value($item['QPS']);
        ?>
</td>
        <td><?php 
        echo check_value($item['TPS']);
        ?>
</td>
        <td><?php 
        echo check_value($item['Bytes_received']);
        ?>
KB</td>
        <td><?php 
Example #12
0
    print_r($renderer->toArray());
    $tpl->assign('static_form', ob_get_contents());
    ob_end_clean();
    //megadjuk a tpl file nevet, amit atadunk az admin.php-nek
    $acttpl = 'shop_actions';
}
//hozzaadas, modositas vege
/**
 * ha aktivaljuk az akciot
 */
if ($sub_act == "act") {
    //ha van aid valtozo es az szam
    if (isset($_GET['aid']) && is_numeric($_GET['aid'])) {
        $aid = intval($_GET['aid']);
        include_once $include_dir . '/function.check.php';
        check_active('iShark_Shop_Actions', 'action_id', $aid);
        //loggolas
        logger($page . '_' . $sub_act);
        header('Location: admin.php?p=' . $module_name . '&act=' . $page . '&pageID=' . $page_id);
        exit;
    } else {
        $acttpl = 'error';
        $tpl->assign('errormsg', $locale->get('actions_error_notexists'));
        return;
    }
}
/**
 * ha toroljuk az akciot
 */
if ($sub_act == "del") {
    if (isset($_GET['aid']) && is_numeric($_GET['aid'])) {
Example #13
0
    // capture the array stucture
    ob_start();
    print_r($renderer->toArray());
    $tpl->assign('dynamic_form', ob_get_contents());
    ob_end_clean();
    //megadjuk a tpl file nevet, amit atadunk az admin.php-nek
    $acttpl = 'dynamic_form';
}
/**
 * ha aktivalunk vagy inaktivalunk egy termeket
 */
if ($sub_act == "act") {
    if (isset($_REQUEST['pid']) && is_numeric($_REQUEST['pid'])) {
        include_once $include_dir . '/function.check.php';
        $pid = intval($_REQUEST['pid']);
        check_active('iShark_Shop_Products', 'product_id', $pid);
        //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=search&field=' . $field . '&ord=' . $ord . '&pageID=' . $page_id . '&cat_fil=' . $cat_fil . '&searchtext=' . $_REQUEST['searchtext'] . '&searchtype=' . $_REQUEST['searchtype']);
            exit;
        } else {
            header('Location: admin.php?p=' . $module_name . '&act=' . $page . '&field=' . $field . '&ord=' . $ord . '&pageID=' . $page_id . '&cat_fil=' . $cat_fil);
            exit;
        }
    } else {
        $acttpl = 'error';
        $tpl->assign('errormsg', $locale->get('products_error_notexists'));
        return;
    }
Example #14
0
        }
    }
    //loggolas
    logger($act, '', '');
    header('Location: admin.php?p=' . $module_name . '&menutype=' . $menuType . '&mid=' . $mid);
    exit;
}
//sorrend modositas vege
/**
 * ha aktivalunk vagy inaktivalunk egy menupontot
 */
if ($act == "act") {
    include_once $include_dir . '/function.check.php';
    $m_id = intval($_REQUEST['m_id']);
    $mid = intval($_REQUEST['mid']);
    check_active('iShark_Menus', 'menu_id', $m_id);
    //loggolas
    logger($act, '', '');
    header('Location: admin.php?p=' . $module_name . '&menutype=' . $menuType . '&mid=' . $mid);
    exit;
}
/**
 * ha nincs semmilyen muvelet, akkor a listat mutatjuk
 */
if ($act == "lst") {
    include_once $include_dir . '/function.menu.php';
    $add_new = array(array('link' => 'admin.php?p=' . $module_name . '&amp;act=add&amp;menutype=' . $menuType, 'title' => $locale->get('title_add'), 'pic' => 'add.jpg'));
    //atadjuk a smarty-nak a kiirando cuccokat
    $tpl->assign('add_new', $add_new);
    $tpl->assign('is_admin', $is_admin);
    $tpl->assign('sitemenu', menu(0, TRUE, 0, 1, 'all', $menuType, 0));
Example #15
0
    // capture the array stucture
    ob_start();
    print_r($renderer->toArray());
    $tpl->assign('static_form', ob_get_contents());
    ob_end_clean();
    //megadjuk a tpl file nevet, amit atadunk az admin.php-nek
    $acttpl = 'shop_groups';
}
/**
 * ha aktivalunk vagy inaktivalunk egy csoportot
 */
if ($sub_act == "act") {
    if (isset($_REQUEST['gid']) && is_numeric($_REQUEST['gid'])) {
        include_once $include_dir . '/function.check.php';
        $gid = intval($_REQUEST['gid']);
        check_active('iShark_Shop_Groups', 'group_id', $gid);
        //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 . '&pageID=' . $page_id);
            exit;
        }
    } else {
        $acttpl = 'error';
        $tpl->assign('errormsg', $locale->get('groups_error_not_exists'));
        return;
    }
Example #16
0
    die;
}
?>
    <table width="705" border="0" cellspacing="0">
    <?php 
$st = "FROM `ad_visibility` WHERE `gid`={$gid} ORDER BY aid DESC";
$q = "SELECT * FROM `ad_visibility` WHERE `gid`={$gid} ORDER BY aid DESC LIMIT {$startpoint},{$limit}";
$result = mysql_query($q) or die('sqlerr 1 groupads');
$i = $startpoint;
while ($ad = mysql_fetch_array($result)) {
    $row = getad($ad['aid']);
    $artid = $row['artid'];
    $q = "select alias,hits from jos_content where id={$artid}";
    $result1 = mysql_query($q) or die('groupads sqlerr 12');
    $row1 = mysql_fetch_array($result1);
    if (check_active($artid)) {
        $i++;
        $link = "viewad.php?id=" . $artid . "&&item=" . $row1['alias'];
        ?>
	      <tr>
        <td width="21" rowspan="4"><?php 
        echo $i;
        ?>
.)</td>
        <td width="144" rowspan="3"><a href="<?php 
        echo $link;
        ?>
" target="_top"><img src="<?php 
        echo $row['timg'];
        ?>
" width="120" height="80" style="border:double" /></a></td>
Example #17
0
    }
} else {
    $catsel = "";
    $catfrom = "";
    $catjoin = "";
    $catwhere = "";
    $catfilt = "";
    $cat_fil = "";
}
//kategóriaszűrés vége
/**
 * ha aktivaljuk vagy deaktivaljuk
 */
if ($sub_act == "act") {
    include_once $include_dir . '/function.check.php';
    check_active('iShark_Contents', 'content_id', $cid);
    //loggolas
    logger($page . '_' . $sub_act);
    header('Location: admin.php?p=' . $module_name . '&act=' . $page . '&field=' . $field . '&ord=' . $ord . '&pageID=' . $page_id . '&cat_fil=' . $cat_fil);
    exit;
}
//aktivalas, deaktivalas vege
/**
 * ha megnezzuk, modositjuk a hirt
 */
if ($sub_act == "mod") {
    //breadcrumb
    $breadcrumb->add($locale->get('mti_form_header_news'), '#');
    //szukseges fuggvenykonyvtarak betoltese
    require_once 'HTML/QuickForm.php';
    require_once 'HTML/QuickForm/jscalendar.php';
Example #18
0
    $tpl->assign('lang_dynamic', $lang_dynamic);
    $tpl->assign('actions_dynamic', $actions_dynamic);
    $tpl->assign('table_headers', $table_headers);
    $tpl->assign('csv_link', 'admin/forms_csv.php?form_id=');
    //megadjuk a tpl file nevet, amit atadunk az admin.php-nek
    $acttpl = 'dynamic_list';
}
/**
 *
 * mezõkhöz tartozó mûveletek
 */
if ($sub_act == "fact") {
    include_once $include_dir . '/function.check.php';
    $field_id = intval($_REQUEST['field_id']);
    $form_id = intval($_REQUEST['form_id']);
    check_active('iShark_Forms_Fields', 'field_id', $field_id);
    //loggolas
    logger($page . '_' . $sub_act);
    header('Location: admin.php?p=' . $module_name . '&act=' . $page . '&sub_act=flst&id=' . $form_id . '&pageID=' . $page_id);
    exit;
}
if ($sub_act == "fdel") {
    $fid = intval($_GET['field_id']);
    $form_id = intval($_REQUEST['form_id']);
    $query = "\n\t\tUPDATE iShark_Forms_Fields \n\t\tSET is_active = '0', \n\t\t\tis_deleted = '1' \n\t\tWHERE field_id = {$fid}\n\t";
    $mdb2->exec($query);
    //loggolas
    logger($page . '_' . $sub_act);
    header('Location: admin.php?p=' . $module_name . '&act=' . $page . '&sub_act=flst&id=' . $form_id . '&pageID=' . $page_id);
    exit;
}
Example #19
0
    //atadjuk a smarty-nak a kiirando cuccokat
    $tpl->assign('page_data', $paged_data['data']);
    $tpl->assign('page_list', $paged_data['links']);
    $tpl->assign('back_arrow', 'admin.php');
    //megadjuk a tpl file nevet, amit atadunk az admin.php-nek
    $acttpl = 'forms_list';
}
/**
 *
 * mezõkhöz tartozó mûveletek
 */
if ($act == "field_act") {
    include_once $include_dir . '/function.check.php';
    $field_id = intval($_REQUEST['field_id']);
    $form_id = intval($_REQUEST['form_id']);
    check_active('iShark_FormBuilder_Fields', 'field_id', $field_id);
    //loggolas
    logger($act, '', '');
    header('Location: admin.php?p=' . $module_name . '&act=field_lst&form_id=' . $form_id);
    exit;
}
if ($act == "field_del") {
    $fid = intval($_GET['field_id']);
    $form_id = intval($_REQUEST['form_id']);
    $query = "\n\t\tUPDATE iShark_FormBuilder_Fields \n\t\tSET is_active = '0', is_deleted = '1' \n\t\tWHERE field_id = {$fid}\n\t";
    $mdb2->exec($query);
    //loggolas
    logger($act, '', '');
    header('Location: admin.php?p=' . $module_name . '&act=field_lst&form_id=' . $form_id . '&field=' . $field . '&ord=' . $ord . '&pageID=' . $page_id);
    exit;
}
Example #20
0
        ?>
</td>
        <td><?php 
        echo check_value($item['version']);
        ?>
</td>
        <td><?php 
        echo check_connections(check_value($item['session_total']));
        ?>
</td>
        <td><?php 
        echo check_active(check_value($item['session_actives']));
        ?>
</td>
        <td><?php 
        echo check_active(check_value($item['session_waits']));
        ?>
</td>
   
        <td><?php 
        if ($item['connect'] == '1') {
            ?>
<a href="<?php 
            echo site_url('oracle/chart/' . $item['server_id']);
            ?>
"><img src="./images/chart.gif"/></a> <?php 
        } else {
            ?>
--- <?php 
        }
        ?>
Example #21
0
         //ha nem aktiv es a befejezo datum nem ures, akkor mar egyszer le lett zarva
         if ($row['is_active'] == 0 && $row['end_date'] != "0000-00-00 00:00:00") {
             $acttpl = "error";
             $tpl->assign('errormsg', $locale->get('error_finished'));
             return;
         } elseif ($row['is_active'] == 1 && $row['end_date'] == "0000-00-00 00:00:00") {
             $query = "\n\t\t\t\t\tUPDATE iShark_Polls \n\t\t\t\t\tSET end_date = NOW() \n\t\t\t\t\tWHERE poll_id = {$pid}\n\t\t\t\t";
             $mdb2->exec($query);
             check_active('iShark_Polls', 'poll_id', $pid);
             //loggolas
             logger($act, '', '');
         } else {
             $menu = $row['menu_id'];
             $query = "\n\t\t\t\t\tUPDATE iShark_Polls \n\t\t\t\t\tSET start_date = NOW() \n\t\t\t\t\tWHERE poll_id = {$pid}\n\t\t\t\t";
             $mdb2->exec($query);
             check_active('iShark_Polls', 'poll_id', $pid);
             //lekerdezzuk, hogy van-e ezen kivul lezaratlan szavazas, ha van, akkor azt lezarjuk
             $query = "\n\t\t\t\t\tSELECT poll_id AS pid \n\t\t\t\t\tFROM iShark_Polls \n\t\t\t\t\tWHERE menu_id = {$menu} AND is_active = 1 AND poll_id != {$pid}\n\t\t\t\t";
             $result = $mdb2->query($query);
             if ($result->numRows() > 0) {
                 while ($row = $result->fetchRow()) {
                     $pid = $row['pid'];
                     $query = "\n\t\t\t\t\t\t\tUPDATE iShark_Polls \n\t\t\t\t\t\t\tSET end_date = NOW(), is_active = 0 \n\t\t\t\t\t\t\tWHERE poll_id = {$pid}\n\t\t\t\t\t\t";
                     $mdb2->exec($query);
                 }
             }
             //loggolas
             logger($act, '', '');
         }
     }
 } else {
Example #22
0
        ?>
</td>
        <td><?php 
        echo check_value($item['version']);
        ?>
</td>
        <td><?php 
        echo check_connections(check_value($item['threads_connected']));
        ?>
</td>
        <td><?php 
        echo check_active(check_value($item['threads_running']));
        ?>
</td>
        <td><?php 
        echo check_active(check_value($item['threads_waits']));
        ?>
</td>
        <td><?php 
        echo format_kbytes($item['bytes_received_persecond']);
        ?>
</td>
        <td><?php 
        echo format_kbytes($item['bytes_sent_persecond']);
        ?>
</td>
        <td><?php 
        echo check_value($item['queries_persecond']);
        ?>
</td>
        <td><?php