Ejemplo n.º 1
0
# inits
$hack_info['id'] = 0;
$_MSG = array();
$_TABS = array();
$script = $BASEURL . '/index.php?page=admin&user='******'uid'] . '&code=' . $CURUSER['random'] . '&do=kocs&';
$uid = $CURUSER['uid'];
$uname = $CURUSER['username'];
# tabs
$_TABS[] = array('ktab=backup', $language['KOCS_TAB_BACKUP']);
$_TABS[] = array('ktab=restore', $language['KOCS_TAB_RESTORE']);
$_TABS[] = array('ktab=config', $language['KHEZ_CONFIG']);
$_TABS[] = array('ktab=help', $language['KHEZ_FAQ']);
# get config & test permissions
global $kocsfig;
if ($kocs_db) {
    $kocsfig = get_khez_config('SELECT `key`,`value` FROM `' . $TABLE_PREFIX . 'khez_configs` WHERE `key` LIKE "kocs_%" LIMIT 8;', 0);
    if ($kocsfig['kocs_cfg_keycheck']) {
        $key = isset($_GET['key']) ? $_GET['key'] : md5($CURUSER['uid'] . md5($_POST[$_POST['field']]));
        $goodKey = $key == md5($CURUSER['uid'] . $kocsfig['kocs_cfg_key']);
    } else {
        $goodKey = true;
    }
} else {
    $goodKey = false;
}
# code
if ($goodKey) {
    switch ($_GET['ktab']) {
        case 'help':
            include $ADMIN_PATH . '/kocs/acp.help.php';
            break;
Ejemplo n.º 2
0
         $img = abs((int) $_POST['img']);
         $url = abs((int) $_POST['url']);
         $chars = abs((int) $_POST['chars']);
         $loc = abs((int) $_POST['loc']);
         $file = sqlesc($_POST['file']);
         quickQuery('DELETE FROM `' . $TABLE_PREFIX . 'khez_configs` WHERE `key` LIKE "xtd_%" LIMIT 7;', true);
         quickQuery('INSERT INTO `' . $TABLE_PREFIX . 'khez_configs` VALUES ("xtd_enabled", "' . $enabled . '"), ("xtd_img", ' . $img . '), ("xtd_url", ' . $url . '), ("xtd_chars", ' . $chars . '), ("xtd_file", ' . $file . '), ("xtd_casesens", ' . $case . '), ("xtd_loc", ' . $loc . ');', true);
     } elseif ($_POST['confirm'] == $language['HACK_UNINSTALL']) {
         quickQuery('DELETE FROM `' . $TABLE_PREFIX . 'khez_configs` WHERE `key` LIKE "xtd_%";', true);
         $xtd_db = false;
         break;
     }
 case 'read':
 case '':
 default:
     $xtdfig_db = get_khez_config('SELECT `key`,`value` FROM `' . $TABLE_PREFIX . 'khez_configs` WHERE `key` LIKE "xtd_%" LIMIT 7;', 0);
     # init vars
     $pick = $xtdfig_db['xtd_loc'];
     # search type combo
     $combo = '<select name="loc">';
     $combo .= "\n" . '<option value="0"' . ($pick == 0 ? ' selected="selected" ' : '') . '>' . $language['XTD_EXACT'] . '</option>';
     $combo .= "\n" . '<option value="1"' . ($pick == 1 ? ' selected="selected" ' : '') . '>' . $language['XTD_BEGIN'] . '</option>';
     $combo .= "\n" . '<option value="2"' . ($pick == 2 ? ' selected="selected" ' : '') . '>' . $language['XTD_END'] . '</option>';
     $combo .= "\n" . '<option value="2"' . (!in_array($pick, array(0, 1, 2)) ? ' selected="selected" ' : '') . '>' . $language['XTD_ANYWHERE'] . '</option>';
     $combo .= '</select>';
     # xtd configs
     $xtd['ENABLED'] = $xtdfig_db['xtd_enabled'] ? 'checked="checked"' : '';
     $xtd['CASE'] = $xtdfig_db['xtd_casesens'] ? 'checked="checked"' : '';
     $xtd['IMG'] = $xtdfig_db['xtd_img'];
     $xtd['URL'] = $xtdfig_db['xtd_url'];
     $xtd['CHARS'] = $xtdfig_db['xtd_chars'];