コード例 #1
0
ファイル: language.php プロジェクト: gitye/e107
    header("location:" . e_BASE . "index.php");
    exit;
}
//include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('language', true);
$e_sub_cat = 'language';
require_once "auth.php";
$frm = e107::getForm();
$mes = e107::getMessage();
include_lan(e_LANGUAGEDIR . e_LANGUAGE . "/admin/lan_lancheck.php");
require_once e_ADMIN . "lancheck.php";
require_once e_HANDLER . "language_class.php";
// $ln = new language;
$ln = $lng;
$lck = new lancheck();
$tabs = table_list();
// array("news","content","links");
$lanlist = e107::getLanguage()->installed();
// Bugfix - don't use e_LANLIST as it's cached (SESSION)
$message = '';
if (e_QUERY) {
    $tmp = explode('.', e_QUERY);
    $action = varset($tmp[0]);
    $sub_action = varset($tmp[1]);
    $id = varset($tmp[2]);
    unset($tmp);
} elseif (!getperms('0')) {
    $action = 'tools';
}
if (isset($_POST['submit_prefs']) && isset($_POST['mainsitelanguage']) && getperms('0')) {
    unset($temp);
コード例 #2
0
include_once 'ressources/class.users.menus.inc';
include_once 'ressources/class.artica.inc';
include_once 'ressources/class.ini.inc';
include_once 'ressources/class.squid.inc';
$users = new usersMenus();
if (!$users->AsWebStatisticsAdministrator) {
    $tpl = new templates();
    echo "alert('" . $tpl->javascript_parse_text("{ERROR_NO_PRIVS}") . "')";
    die;
}
if (isset($_GET["popup"])) {
    popup();
    exit;
}
if (isset($_GET["list"])) {
    table_list();
    exit;
}
js();
function js()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $report_type = $_GET["report_type"];
    $title = $tpl->javascript_parse_text("{browse_cache}:{$report_type}");
    echo "YahooWin6('850','{$page}?popup=yes&report_type={$report_type}&t={$_GET["t"]}','{$title}')";
}
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
コード例 #3
0
	include_once('ressources/class.squid.inc');
	include_once('ressources/class.dansguardian.inc');
	header("Pragma: no-cache");	
	header("Expires: 0");
	header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
	header("Cache-Control: no-cache, must-revalidate");	
	$user=new usersMenus();
	if(!$user->AsSquidAdministrator){
		$tpl=new templates();
		echo "alert('".$tpl->javascript_parse_text("{ERROR_NO_PRIVS}").");";
		exit;
		
	}
	if(isset($_GET["add-ldap-group"])){save_group();exit;}
	if(isset($_GET["popup-index"])){popup_index();exit;}
	if(isset($_GET["table"])){table_list();exit;}
	if(isset($_GET["add-ip-addr"])){table_add_ips();exit;}
	if(isset($_GET["del-ip-addr"])){table_del_ips();exit;}
	if(isset($_GET["popup-group"])){popup_group();exit;}
	if(isset($_GET["choose-group"])){groups_fields();exit;}
	
	
popup();

function popup(){
	$page=CurrentPageName();
	$html="<div id='mainDansRulesPanel'></div>
	
	<script>
		function ResfreshMainDansRulesPanel(){
			LoadAjax('mainDansRulesPanel','$page?popup-index=yes')
コード例 #4
0
ファイル: db.php プロジェクト: notzen/e107
 /**
  * Export XML Dump
  * @return  none
  */
 private function exportXmlForm()
 {
     $emessage = eMessage::getInstance();
     $frm = e107::getSingleton('e_form');
     //TODO LANs
     $text = "<form method='post' action='" . e_SELF . "?" . e_QUERY . "' id='core-db-export-form'>\n\t\t\t<fieldset id='core-db-export'>\n\t\t\t<legend class='e-hideme'>Export Options</legend>\n\t\t\t\t<table class='table adminlist'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col style='width: 80%' />\n\t\t\t\t\t<col style='width: 20%' />\n\t\t\t\t</colgroup>\n\t\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>" . $frm->checkbox_toggle('check-all-verify', 'xml_prefs') . " Preferences</th>\n\t\t\t\t\t<th class='right'>Rows</th>\n\n\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\n\t\t\t\t";
     $pref_types = e107::getConfig()->aliases;
     unset($pref_types['core_old'], $pref_types['core_backup']);
     //		$exclusions = array('core_old'=>1,'core_backup'=>1);
     //	$filteredprefs = array_diff($pref_types,$exclusions);
     foreach ($pref_types as $key => $description) {
         $checked = $_POST['xml_prefs'][$key] == $key ? 1 : 0;
         $text .= "<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . $frm->checkbox("xml_prefs[" . $key . "]", $key, $checked) . "\n\t\t\t\t\t\t\t" . LAN_PREFS . ": " . $key . "</td>\n\t\t\t\t\t\t\t<td>&nbsp;</td>\n\n\t\t\t\t\t\t\t</tr>";
     }
     $text .= "</tbody>\n\t\t\t\t</table>\n\t\t\t\t<table class='table adminlist'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col style='width: 80%' />\n\t\t\t\t\t<col style='width: 20%' />\n\t\t\t\t</colgroup>\n\t\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>" . $frm->checkbox_toggle('check-all-verify', 'xml_tables') . "Tables</th>\n\t\t\t\t\t<th class='right'>Rows</th>\n\n\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n";
     $tables = table_list();
     foreach ($tables as $name => $count) {
         $checked = $_POST['xml_tables'][$name] == $name ? 1 : 0;
         $text .= "<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . $frm->checkbox("xml_tables[" . $name . "]", $name, $checked) . " Table Data: " . $name . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class='right'>{$count}</td>\n\t\t\t\t\t\t</tr>";
     }
     $text .= "\n\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\n\t\t\t\t<table class='table adminlist'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col style='width: 80%' />\n\t\t\t\t\t<col style='width: 20%' />\n\t\t\t\t</colgroup>\n\t\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan='2'>" . LAN_OPTIONS . "</th>\n\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t\t<td colspan='2'>";
     $checked = vartrue($_POST['package_images']) ? 1 : 0;
     $text .= $frm->checkbox("package_images", 'package_images', $checked) . " Convert paths and package images and xml into: <i>" . e107::getParser()->replaceConstants(EXPORT_PATH) . "</i>\n\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t\t</table>\n\n\t\t\t\t<div class='buttons-bar center'>\n\t\t\t\t\t" . $frm->admin_button('exportXmlFile', "Export File", 'exportXmlFile') . "\n\t\t\t\t</div>\n\t\t\t</fieldset>\n\t\t</form>\t";
     e107::getRender()->tablerender("Export Options", $emessage->render() . $text);
 }
コード例 #5
0
	include_once('ressources/class.templates.inc');
	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');
	include_once('ressources/class.squid.inc');
	
	
$usersmenus=new usersMenus();
if(!$usersmenus->AsDansGuardianAdministrator){
	$tpl=new templates();
	$alert=$tpl->_ENGINE_parse_body('{ERROR_NO_PRIVS}');
	echo "alert('$alert');";
	die();	
}
if(isset($_GET["table"])){table();exit;}
if(isset($_GET["popup"])){popup();exit;}
if(isset($_GET["rules-table-list"])){table_list();exit;}
if(isset($_POST["DeleteWhiteListed"])){DeleteWhiteListed();exit;}

table();

function table(){
	$q=new mysql_squid_builder();
	$tpl=new templates();
	$page=CurrentPageName();
	$page=CurrentPageName();
	$sock=new sockets();
	$t=time();	
	
	
	//