예제 #1
0
 function changeBackground()
 {
     global $smarty;
     if (options::getPrevious('style_background') == $_POST['option_style_background']) {
         return;
     }
     if ($_POST['option_style_background'] == 0) {
         return;
     }
     $dimensions = getimagesize('background/' . $_POST['option_style_background']);
     if (!$dimensions) {
         $dimensions = array(0, 0);
     }
     //config::set('style_background_x', $dimensions[0]);
     //config::set('style_background_y', $dimensions[1]);
     //$smarty->assign('background_x', $dimensions[0]);
     //$smarty->assign('background_y', $dimensions[1]);
 }
예제 #2
0
파일: settings.php 프로젝트: rpkoller/epoch
 /**
  * Saves a config
  *
  * @uses "wp_ajax_epoch_save_config" hook
  *
  * @since 0.0.1
  */
 public function save_config()
 {
     if (empty($_POST['epoch-setup']) || !wp_verify_nonce($_POST['epoch-setup'], 'epoch')) {
         if (empty($_POST['config'])) {
             return;
         }
     }
     if (!empty($_POST['epoch-setup']) && empty($_POST['config'])) {
         $config = stripslashes_deep($_POST['config']);
         options::update($config);
         wp_redirect('?page=epoch&updated=true');
         exit;
     }
     if (!empty($_POST['config'])) {
         $config = json_decode(stripslashes_deep($_POST['config']), true);
         if (wp_verify_nonce($config['epoch-setup'], 'epoch')) {
             options::update($config);
             wp_send_json_success($config);
         }
     }
     // nope
     wp_send_json_error($config);
 }
예제 #3
0
파일: db.php 프로젝트: emaxv/DataBase
<?php

include 'Modules/topper.php';
require 'connect.php';
require 'Classes/option.class.php';
options::show();
include 'Modules/footer.php';
예제 #4
0
파일: top.php 프로젝트: relaismago/outils
    echo "<td align='left' width='40%' valign='top'>";
    afficherAccesRapide();
    $recherche = new recherche();
    echo $recherche->get_html_input();
    echo "</td>";
}
?>

</tr>
</table>

<?php 
unset($_SESSION['options']);
if (userIsGuilde() || userIsGroupSpec()) {
    if (!isset($_SESSION['options'])) {
        $options = new options($_SESSION['AuthTroll']);
        $_SESSION["options"] = $options->get_options_tab();
    }
    unset($options);
    $options = $_SESSION["options"];
    if ($options["date_option"] == '') {
        ?>
	<table class='mh_tdborder' align='center' width='80%'>
		<tr align='center' class=mh_tdborder'>
			<td colspan='3' class='mh_tdtitre'>
				<h2><font color='red'>Nouvelles options disponibles et vous ne les avez pas encore
				r&eacute;gl&eacute;es ! C'est par là => <a href='/options.php'>Ici</a></font></h2>
			</td>
		</tr>
	</table><br>
예제 #5
0
파일: admin.php 프로젝트: biow0lf/evedev-kb
<?php

/**
 * @package EDK
 */
// admin menu now loads all admin pages with options
require_once 'common/admin/admin_menu.php';
$page = new Page();
$page->setAdmin();
if ($_POST) {
    options::handlePost();
}
$page->setContent(options::genOptionsPage());
$page->addContext(options::genAdminMenu());
if (!edkURI::getArg('field', 1) || !edkURI::getArg('sub', 1) || edkURI::getArg('field', 1) == 'Advanced' && edkURI::getArg('sub', 2) == 'Configuration') {
    $page->setTitle('Administration - Board Configuration (Current version: ' . KB_VERSION . ' ' . KB_RELEASE . ')');
}
$page->generate();
<?php

/*
 * $Date$
 * $Revision$
 * $HeadURL$
 */
//set up options
options::cat('Modules', 'KillCharts', 'Settings');
//$days = 25;					//No of days to chart: mod_killcharts_days
options::fadd('Number of days to trend', 'none', 'custom', array('kgraph', 'daysToTrend'));
//$killbarcol =	'#329F00';	//Colour of kill bars: mod_killcharts_killcol
options::fadd('Colour of Kill Bars', 'none', 'custom', array('kgraph', 'killBarColour'));
//$lossbarcol =	'#F90000';	//Colour of loss bars: mod_killcharts_losscol
options::fadd('Colour of Loss Bars', 'none', 'custom', array('kgraph', 'lossBarColour'));
//$bgcolour = 	'#555555';	//Background colour of flash chart: mod_killcharts_bgcol
options::fadd('Background Colour', 'none', 'custom', array('kgraph', 'backGroundColour'));
//$chartType = 'table     //Chart type mod_killcharts_type
options::fadd('Chart Type', 'none', 'custom', array('kgraph', 'chartType'));
//reset defaults
options::cat('Modules', 'KillCharts', 'Reset');
options::fadd('Reset Default Values', 'none', 'custom', array('kgraph', 'resetDefaults'));
options::cat('Modules', 'KillCharts', 'About');
options::fadd('KillCharts for EDK3', 'none', 'custom', array('kgraph', 'about'));
예제 #7
0
function update_options($upd)
{
    if ($upd != 'upd') {
        return;
    }
    $options = new options($_SESSION[AuthTroll]);
    $options->set_display_mouches_option($_REQUEST[display_mouches_option]);
    $options->set_display_noms_mouches_option($_REQUEST[display_noms_mouches_option]);
    $options->set_refresh_dla_option($_REQUEST[refresh_dla_option]);
    $options->set_vue_zoom_option($_REQUEST[vue_zoom_option]);
    $options->set_vue_taille_option($_REQUEST[vue_taille_option]);
    $options->set_vue_animations_option($_REQUEST[vue_animations_option]);
    $options->set_vue_max_pa_option($_REQUEST[vue_max_pa_option]);
    $options->set_vue_display_trollometer_option($_REQUEST[vue_display_trollometer_option]);
    $options->set_vue_fantomes_option($_REQUEST[vue_fantomes_option]);
    $message = $options->write_db();
    /*  $id_troll_option = $_SESSION[AuthTroll];
      $display_mouches_option = $_REQUEST[display_mouches_option];
      $display_noms_mouches_option = $_REQUEST[display_noms_mouches_option];
      $refresh_dla_option = $_REQUEST[refresh_dla_option];
    	$message .= editDbOptions($id_troll_option,$display_mouches_option,$display_noms_mouches_option,$refresh_dla_option);
    */
    if ($message != "") {
        $message = "Erreur : {$message}";
    } else {
        $message = "Modifications effectuées";
    }
    ?>
		<table class='mh_tdborder' align='center' width='80%'>
			<tr class='mh_tdtitre'>
				<td align='center'>
					<h2><i><?php 
    echo $message;
    ?>
</i></h2>
				</td>
			</tr>
		</table><br>

	<?php 
}
예제 #8
0
 protected function setAuthenticationUser()
 {
     $this->mapper->expects($this->once())->method('findByUsername')->with('ZfcUser')->will($this->returnValue($this->user));
     $this->options->expects($this->once())->method('getAuthIdentityFields')->will($this->returnValue(array('username')));
 }
예제 #9
0
 /**
  * Generate an options page based on the contentions of the URL request.
  * 
  * @global Smarty $smarty
  * @global Page $page
  *
  * @return string html for an options page.
  */
 public static function genOptionsPage()
 {
     $field = urldecode(edkURI::getArg('field', 1));
     $sub = urldecode(edkURI::getArg('sub', 2));
     if (!$field || !$sub) {
         $field = "Advanced";
         $sub = "Configuration";
     }
     global $smarty, $page;
     if (is_object($page)) {
         $page->setTitle('Administration - ' . $sub);
     }
     // create the option field
     $smarty->assign('field', urlencode($field));
     $smarty->assign('sub', urlencode($sub));
     $smarty->assign('actionURL', edkURI::build(array(array('a', 'admin', true), array('field', urlencode($field), true), array('sub', urlencode($sub), true))));
     $html = $smarty->fetch(get_tpl('admin_options_field_head'));
     // create all option sets
     foreach (self::$data[$field][$sub] as $set => $options) {
         $smarty->assign('set', $set);
         $html .= $smarty->fetch(get_tpl('admin_options_set_head'));
         // create all options in the set
         foreach ($options as $option) {
             $html .= options::assembleElement($option);
         }
         $html .= $smarty->fetch(get_tpl('admin_options_set_foot'));
     }
     $html .= $smarty->fetch(get_tpl('admin_options_field_foot'));
     return $html;
 }
예제 #10
0
파일: delete.php 프로젝트: emaxv/DataBase
<?php

require_once '../connect.php';
require_once '../Classes/option.class.php';
options::delete();
header('Location: ../db.php');
예제 #11
0
<?php

/**
 * @package EDK
 */
if (!class_exists('options')) {
    exit('This killboard is not supported (options package missing)!');
}
options::cat('Modules', 'AJCron', 'Settings');
options::fadd('Reset next scheduled run to now', 'ajcron_resetNextRun', 'checkbox');
options::fadd('Reset running jobs', 'ajcron_resetRunning', 'checkbox');
options::fadd('Blocking Cronjobs', 'ajcron_blocking', 'checkbox');
options::fadd('Next scheduled run', 'none', 'custom', array('ajcron', 'getNextRunDisplay'), array('ajcron', 'resetNextRunCheckbox'));
options::fadd('Job Format', 'none', 'custom', array('ajcron', 'helpFormat'));
options::fadd('Jobs', 'ajcron_jobs', 'textarea:cols:70:rows:10');
options::fadd('Runtable', 'anone', 'custom', array('ajcron', 'getRuntable'));
예제 #12
0
 </title>
	<link href="theme/default/bootstrap/css/bootstrap.min.css" rel="stylesheet">
	<script src="theme/default/js/jquery.js"></script>
	<script src="theme/default/js/javascript.js"></script>
	<script src="theme/default/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
	<?php 
if (Input::Get("app_id")) {
    $fb = new Facebook();
    $app_id = Input::Get("app_id");
    // check existance of appid gevin in the database
    // get app secret
    $app_secret = DB::GetInstance()->QueryGet("SELECT app_secret FROM fbapps WHERE appid = ? ", array($app_id));
    if ($app_secret->count() == 0) {
        echo "\r\n\t\t\t<div class='alerts alert alert-danger'>\r\n\t\t\t<p class='alerttext'>facebook App not found!</p>\r\n\t\t\t</div>";
    } else {
        try {
            $notic = $fb->FbAuth($app_id, $app_secret->first()->app_secret, options::Get("siteurl") . "FbAuth.php?app_id=" . $app_id, Input::Get("oldApi"));
            echo "<div class='alerts alert alert-success'>\r\n\t\t\t\t<p class='alerttext'>Successfully authorized <a href='#' onclick='window.opener.location.href = window.opener.location.href;window.close();'>Close this windiw</a>.</p>\r\n\t\t\t\t</div>";
        } catch (Exception $ex) {
            echo "\r\n\t\t\t\t<div class='alerts alert alert-danger'>\r\n\t\t\t\t<p class='alerttext'>Error : " . $ex->GetMessage() . "</a></p>\r\n\t\t\t\t</div>";
        }
    }
} else {
    echo "\r\n\t\t<div class='alerts alert alert-danger'>\r\n\t\t<p class='alerttext'>Required parameters app_id not supplied.</p>\r\n\t\t</div>";
}
$tempate->footer();
?>
</body>
</html>
예제 #13
0
<?php

if (!class_exists('options')) {
    exit('This killboard is not supported (options package missing)!');
}
options::cat('Advanced', 'Posting Options', 'Scouts');
options::fadd('Enable Scouts', 'scouts', 'checkbox');
options::fadd('Require password for Scouts', 'scouts_pw', 'checkbox');
options::fadd('Scout post password', 'scouts_password', 'edit');
예제 #14
0
파일: send.php 프로젝트: emaxv/DataBase
<?php

require_once '../connect.php';
require_once '../Classes/option.class.php';
options::send();
header('Location: ../db.php');
?>
/
예제 #15
0
/**
 * This file contains the generic admin options in the new format
 * look here for some examples.
 * @package EDK
 */
options::cat('Advanced', 'Cache', 'Query Cache');
options::fadd('Enable SQL-Query File Cache', 'cfg_qcache', 'checkbox', '', '', 'Select only one of file cache or memcache');
options::fadd('Enable SQL-Query MemCache', 'cfg_memcache', 'checkbox', '', '', 'Requires a separate memcached installation');
options::fadd('Memcached server', 'cfg_memcache_server', 'edit:size:50');
options::fadd('Memcached port', 'cfg_memcache_port', 'edit:size:8');
options::cat('Advanced', 'Cache', 'Even More Caching');
options::fadd('Killmail Caching enabled', 'km_cache_enabled', 'checkbox');
options::fadd('Object Caching enabled', 'cfg_objcache', 'checkbox', '', '', 'Advisable for memcached boards.');
options::cat('Advanced', 'Cache', 'Clear Caches');
options::fadd('File Cache', 'none', 'custom', array('admin_acache', 'optionClearCaches'), array('admin_acache', 'clearCaches'));
options::fadd('Kill Summary Cache', 'none', 'custom', array('admin_acache', 'optionClearSum'), array('admin_acache', 'clearSumCache'));
class admin_acache
{
    function getKillmails()
    {
        $count = 0;
        if (defined('KB_MAILCACHEDIR')) {
            if (is_dir(KB_MAILCACHEDIR)) {
                if ($files = scandir(KB_MAILCACHEDIR)) {
                    foreach ($files as $file) {
                        if (substr($file, 0, 1) != '.') {
                            $count++;
                        }
                    }
                }
            }
예제 #16
0
파일: update.php 프로젝트: emaxv/DataBase
<?php

require_once '../connect.php';
require_once '../Classes/option.class.php';
options::update();
header('Location: ../db.php');
예제 #17
0
options::cat('Advanced', 'Configuration', 'Public-Mode');
options::fadd('Only Kills in SummaryTables', 'public_summarytable', 'checkbox', '', '', 'Set no board owners to work in public mode');
options::fadd('Remove Losses Page', 'public_losses', 'checkbox');
options::fadd('Stats Page', 'public_stats', 'select', array('admin_config', 'createSelectStats'));
options::cat('Advanced', 'Configuration', 'Pilot/Corp/Alliance ID (Provide' . ' either exact full name, ID or external ID)');
options::fadd('Add Pilot', '', 'custom', array('admin_config', 'createPilot'));
options::fadd('Add Corporation', '', 'custom', array('admin_config', 'createCorp'));
options::fadd('Add Alliance', '', 'custom', array('admin_config', 'createAlliance'));
if (config::get('cfg_pilotid')) {
    options::fadd('Remove Pilot', 'rem_pilotid', 'select', array('admin_config', 'removePilot'));
}
if (config::get('cfg_corpid')) {
    options::fadd('Remove Corporation', 'rem_corpid', 'select', array('admin_config', 'removeCorp'));
}
if (config::get('cfg_allianceid')) {
    options::fadd('Remove Alliance', 'rem_allianceid', 'select', array('admin_config', 'removeAlliance'));
}
class admin_config
{
    public static function checkHost()
    {
        if (!isset($_POST['option_cfg_kbhost'])) {
            return;
        }
        $newhost = preg_replace('/\\/+$/', '', $_POST['option_cfg_kbhost']);
        config::set('cfg_kbhost', $newhost);
        $_POST['option_cfg_kbhost'] = $newhost;
    }
    public static function checkImg()
    {
        if (!isset($_POST['option_cfg_img'])) {
예제 #18
0
 /**
  * Create a new item
  *
  * @uses "wp_ajax_frmwks_create_formworks"  action
  *
  * @since 0.0.1
  */
 public function create_new_formworks()
 {
     $can = options::can();
     if (!$can) {
         status_header(500);
         wp_die(__('Access denied', 'formworks'));
     }
     if (!empty($_POST['import'])) {
         $config = json_decode(stripslashes_deep($_POST['import']), true);
         if (empty($config['name']) || empty($config['slug'])) {
             wp_send_json_error($_POST);
         }
         $id = null;
         if (!empty($config['id'])) {
             $id = $config['id'];
         }
         options::create($config['name'], $config['slug'], $id);
         options::update($config);
         wp_send_json_success($config);
     }
     $new = options::create($_POST['name'], $_POST['slug'], $_POST['form'], $_POST['view_type']);
     if (is_array($new)) {
         wp_send_json_success($new);
     } else {
         wp_send_json_error($_POST);
     }
 }
예제 #19
0
<?php

/**
 * @package EDK
 */
if (!class_exists('options')) {
    header('Location: ' . KB_HOST . '/?a=admin&field=Modules&sub=Mail%20Forward');
}
options::cat('Modules', 'Mail Forward', 'Forwarding');
options::fadd('Forwarding active', 'forward_active', 'checkbox');
options::fadd('Forward site', 'forward_site', 'edit:size:50');
options::fadd('Forward password', 'forward_pass', 'edit');
예제 #20
0
    /**
     * Output tracking code
     *
     * @since 1.0.0
     *
     */
    public function print_front_scripts()
    {
        $formworks = options::get_single('formworks');
        if (!empty($formworks['external']['ga'])) {
            ?>
			<script>
			(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
			(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
			m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
			})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

			ga('create', '<?php 
            echo $formworks['external']['ga'];
            ?>
', 'auto');
			ga('send', 'pageview');
			</script>
			<?php 
        }
    }
예제 #21
0
<?php

/**
 * @package EDK
 */
options::cat('Modules', 'Known Members', 'Settings');
options::fadd('Remove Known Members page for board owner', 'mod_knownmembers_own', 'checkbox');
options::fadd('Add Char. Portrait', 'mod_knownmembers_img', 'checkbox');
options::fadd('Add Kill Points', 'mod_knownmembers_kllpnts', 'checkbox');
options::fadd('Add Damage Done(isk)', 'mod_knownmembers_dmgdn', 'checkbox');
options::fadd('Add Damage Recived(isk)', 'mod_knownmembers_dmgrcv', 'checkbox');
options::fadd('Add Efficency', 'mod_knownmembers_eff', 'checkbox');
options::fadd('Add Last Seen In', 'mod_knownmembers_lastseen', 'checkbox');
예제 #22
0
 /**
  * Checks if banner has changed, updates page before display and resets banner size.
  *
  * If the banner is changed the stored size is updated and used to display
  *  the banner image. Smarty variables are updated so display is immediate.
  */
 function changeBanner()
 {
     global $smarty;
     if (options::getPrevious('style_banner') == $_POST['option_style_banner']) {
         return;
     }
     if ($_POST['option_style_banner'] == 0) {
         return;
     }
     $dimensions = getimagesize('banner/' . $_POST['option_style_banner']);
     if (!$dimensions) {
         $dimensions = array(0, 0);
     }
     config::set('style_banner_x', $dimensions[0]);
     config::set('style_banner_y', $dimensions[1]);
     $smarty->assign('banner_x', $dimensions[0]);
     $smarty->assign('banner_y', $dimensions[1]);
 }
예제 #23
0
 function generate()
 {
     return options::genAdminMenu();
 }
예제 #24
0
<?php

/**
 * @package EDK
 */
options::cat('Maintenance', 'Database', 'Table Checks');
options::fadd('Reinstall CCP DB', 'none', 'custom', array('admin_db', 'CCPDBlink'));
class admin_db
{
    /**
     * Create an option to link to the database upgrade page.
     * @return string HTML link to the database upgrade page.
     */
    function CCPDBlink()
    {
        if (!file_exists("update/CCPDB/update.php")) {
            return "Database update installer is not present.";
        }
        if (!file_exists("packages/database/kb3_dgmtypeattributes/table.xml")) {
            return "Database packages are not installed.";
        }
        return "<a href='" . KB_HOST . "/update/index.php?package=CCPDB&amp;do=reset'>" . "Reinstall</a>";
    }
}
예제 #25
0
<?php

/**
 * @package EDK
 */
options::cat('Advanced', 'Posting Options', 'Posting Options');
options::fadd('Enable Comments', 'comments', 'checkbox');
options::fadd('Require password for Comments', 'comments_pw', 'checkbox');
options::fadd('Forbid posting', 'post_forbid', 'checkbox');
options::fadd('Mail post password', 'post_password', 'password', '', array('admin_posting', 'setPostPassword'));
options::fadd('Comment post password', 'comment_password', 'password', '', array('admin_posting', 'setCommentPassword'));
options::fadd('Killmail CC', 'post_mailto', 'edit');
options::fadd('Mailhost', 'post_mailhost', 'edit');
options::fadd('Mailserver', 'post_mailserver', 'edit', '', '', 'This is the server where php connects to send the mail.');
options::fadd('Disallow any killmails before', 'filter_date', 'custom', array('admin_posting', 'dateSelector'), array('admin_posting', 'postDateSelector'));
class admin_posting
{
    function dateSelector()
    {
        $apply = config::get('filter_apply');
        $date = config::get('filter_date');
        if ($date > 0) {
            $date = getdate($date);
        } else {
            $date = getdate();
        }
        $html = "<input type=\"text\" name=\"option_filter_day\" id=\"option_filter_day\" style=\"width:20px\" value=\"{$date['mday']}\"/>&nbsp;";
        $html .= "<select name=\"option_filter_month\" id=\"option_filter_month\">";
        for ($i = 1; $i <= 12; $i++) {
            $t = gmmktime(0, 0, 0, $i, 1, 1980);
            $month = gmdate("M", $t);
options::fadd('Left edge', 'none', 'custom', array('banner', 'vicPicLeft'));
options::fadd('Top edge', 'none', 'custom', array('banner', 'vicPicTop'));
options::fadd('Transparency', 'none', 'custom', array('banner', 'vicPicTrans'));
options::cat('Modules', 'BannerPic', 'Victim Ship Picture');
options::fadd('Left edge', 'none', 'custom', array('banner', 'shipPicLeft'));
options::fadd('Top edge', 'none', 'custom', array('banner', 'shipPicTop'));
options::fadd('Transparency', 'none', 'custom', array('banner', 'shipPicTrans'));
options::cat('Modules', 'BannerPic', 'Killer Text Position');
options::fadd('Left edge', 'none', 'custom', array('banner', 'killStrLeft'));
options::fadd('Top edge', 'none', 'custom', array('banner', 'killStrTop'));
options::cat('Modules', 'BannerPic', 'Victims Corporation Position');
options::fadd('Left edge', 'none', 'custom', array('banner', 'corpStrLeft'));
options::fadd('Top edge', 'none', 'custom', array('banner', 'corpStrTop'));
options::cat('Modules', 'BannerPic', 'Victims Alliance Position');
options::fadd('Left edge', 'none', 'custom', array('banner', 'alliStrLeft'));
options::fadd('Top edge', 'none', 'custom', array('banner', 'alliStrTop'));
options::cat('Modules', 'BannerPic', 'Victims Ship Position');
options::fadd('Left edge', 'none', 'custom', array('banner', 'shipStrLeft'));
options::fadd('Top edge', 'none', 'custom', array('banner', 'shipStrTop'));
options::cat('Modules', 'BannerPic', 'Colours');
options::fadd('Border Box', 'none', 'custom', array('banner', 'boxCols'));
options::fadd('Text', 'none', 'custom', array('banner', 'textCols'));
options::cat('Modules', 'BannerPic', 'Font');
options::fadd('Font File', 'none', 'custom', array('banner', 'fontFile'));
options::fadd('Font Size', 'none', 'custom', array('banner', 'fontSize'));
options::cat('Modules', 'BannerPic', 'Preview');
options::fadd('Disable cache to enable preview updates', 'mod_bannerpic_nocache', 'checkbox');
options::fadd('Preview', 'none', 'custom', array('banner', 'preview'));
options::cat('Modules', 'BannerPic', 'About');
options::fadd('BannerPic for EDK3', 'none', 'custom', array('banner', 'about'));