if (!empty($edit)) { $qh = user_query("select * from users where id = '{$edit}'"); if (ad_queryrows($qh) > 0) { $ur = ad_fetch($qh); } } } break; case "editdomain": $domainid = strip_tags($_GET['edit']); $Domain_View = 1; if (!empty($delete) && $UserName != "testuser") { delete("domains", "domainid", $delete); } if (!empty($activate) && $UserName != "testuser") { toggle_active("domains", "domainid", $activate); } if (!empty($domainid)) { $EditDomain_View = 1; $EditDomain_Step = 0; $NewDomain_View = 0; } break; case "newad": //$NewAd_View=1; $Home_View = 1; ad_connect_db("ads"); $dt = strftime("%Y-%m-%d %H:%M:%S", time()); $ex = strftime("%Y-%m-%d %H:%M:%S", strtotime($ad_expire_default)); ad_query("insert into ads set active = 'N',createdate = '{$dt}'," . "expiredate = '{$ex}',title='-New Undefined Ad-'"); $qh = ad_query("select last_insert_id() from ads");
define('LF', chr(10)); define('CRLF', chr(13) + chr(10)); $parser->setGlobals(array('IMGURL' => CAT_URL . '/modules/droplets/css/images', 'DOCURL' => CAT_URL . '/modules/droplets/docs/readme.html', 'action' => CAT_ADMIN_URL . '/admintools/tool.php?tool=droplets')); $parser->setPath(CAT_PATH . '/modules/droplets/templates/custom'); $parser->setFallbackPath(CAT_PATH . '/modules/droplets/templates/default'); global $settings; $settings = get_settings(); global $val, $backend; $val = CAT_Helper_Validate::getInstance(); $backend = CAT_Backend::getInstance('admintools', 'droplets', false, false); if ($val->get('_REQUEST', 'del', 'numeric')) { $_POST['markeddroplet'] = $val->get('_REQUEST', 'del', 'numeric'); $_REQUEST['delete'] = 1; } if ($val->get('_REQUEST', 'toggle', 'numeric')) { toggle_active($val->get('_REQUEST', 'toggle', 'numeric')); } elseif ($val->get('_REQUEST', 'add')) { edit_droplet('new'); } elseif ($val->get('_REQUEST', 'edit') && !$val->get('_REQUEST', 'cancel')) { edit_droplet($val->get('_REQUEST', 'edit')); } elseif ($val->get('_REQUEST', 'copy', 'numeric')) { copy_droplet($val->get('_REQUEST', 'copy', 'numeric')); } elseif ($val->get('_REQUEST', 'backups') && !$val->get('_REQUEST', 'cancel')) { manage_droplet_backups(); } elseif ($val->get('_REQUEST', 'export') && !$val->get('_REQUEST', 'cancel')) { $info = export_droplets(); list_droplets($info); } elseif ($val->get('_REQUEST', 'import') && !$val->get('_REQUEST', 'cancel')) { import_droplets(); } elseif ($val->get('_REQUEST', 'delete') && !$val->get('_REQUEST', 'cancel')) { export_droplets();
$parser->addGlobal('action', ADMIN_URL . '/admintools/tool.php?tool=droplets'); $parser->addGlobal('TEXT', $TEXT); global $settings; $settings = get_settings(); /** * Load Language file */ $langfile = dirname(__FILE__) . "/languages/" . LANGUAGE . ".php"; require_once !file_exists($langfile) ? dirname(__FILE__) . "/languages/EN.php" : $langfile; $parser->addGlobal('MOD_DROPLET', $MOD_DROPLET); if (isset($_REQUEST['del']) && is_numeric($_REQUEST['del'])) { $_POST['markeddroplet'] = $_REQUEST['del']; $_REQUEST['delete'] = 1; } if (isset($_REQUEST['toggle']) && is_numeric($_REQUEST['toggle'])) { toggle_active($_REQUEST['toggle']); list_droplets(); } elseif (isset($_REQUEST['add'])) { edit_droplet('new'); } elseif (isset($_REQUEST['edit']) && !isset($_REQUEST['cancel'])) { edit_droplet($_REQUEST['edit']); } elseif (isset($_REQUEST['copy']) && is_numeric($_REQUEST['copy'])) { copy_droplet($_REQUEST['copy']); } elseif (isset($_REQUEST['backups']) && !isset($_REQUEST['cancel'])) { manage_backups(); } elseif (isset($_REQUEST['export']) && !isset($_REQUEST['cancel'])) { $info = export_droplets(); list_droplets($info); } elseif (isset($_REQUEST['import']) && !isset($_REQUEST['cancel'])) { import_droplets(); } elseif (isset($_REQUEST['delete']) && !isset($_REQUEST['cancel'])) {
break; case 'delete': delete_jobs($job_id); bb_die($lang['JOB_REMOVED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_JOBS'], '<a href="admin_cron.php?mode=list">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>')); break; } if ($submit) { if ($_POST['mode'] == 'list') { if ($cron_action == 'run' && $jobs) { run_jobs($jobs); } else { if ($cron_action == 'delete' && $jobs) { delete_jobs($jobs); } else { if (($cron_action == 'disable' || $cron_action == 'enable') && $jobs) { toggle_active($jobs, $cron_action); } } } redirect('admin/' . basename(__FILE__) . '?mode=list'); } else { if (validate_cron_post($_POST) == 1) { if ($_POST['mode'] == 'edit') { update_cron_job($_POST); } else { if ($_POST['mode'] == 'add') { insert_cron_job($_POST); } else { bb_die('Mode error'); } }
$_SESSION['edit_userdata'] = TRUE; header('Location: ./manage_users.php'); } elseif ($action == 'edit') { edit_user(); } elseif (defined('HESK_DEMO')) { hesk_process_messages($hesklang['ddemo'], 'manage_users.php', 'NOTICE'); } elseif ($action == 'new') { new_user(); } elseif ($action == 'save') { update_user(); } elseif ($action == 'remove') { remove(); } elseif ($action == 'autoassign') { toggle_autoassign(); } elseif ($action == 'active') { toggle_active(); } else { hesk_error($hesklang['invalid_action']); } } else { /* If one came from the Edit page make sure we reset user values */ if (isset($_SESSION['save_userdata'])) { $_SESSION['userdata'] = $default_userdata; unset($_SESSION['save_userdata']); } if (isset($_SESSION['edit_userdata'])) { $_SESSION['userdata'] = $default_userdata; unset($_SESSION['edit_userdata']); } /* Print header */ require_once HESK_PATH . 'inc/headerAdmin.inc.php';