function __construct()
 {
     parent::__construct();
     $this->load->view_path(FCPATH . 'skins/' . skin() . '/views/');
     if (!$this->input->is_cli_request()) {
         $this->output->enable_profiler($this->config->item('debug'));
         if ($this->session->userdata('logged_in')) {
             $this->db->where('id', $this->session->userdata('id'));
             if (!$this->session->userdata('hibernating')) {
                 $this->db->set('last_active', now());
             }
             $this->db->set('last_ip', ip2int($this->input->ip_address()));
             $this->db->update('users');
         }
     }
 }
Exemple #2
0
    <!--[if !IE]><!-->
    <script src="<?php 
echo jq('jquery-2.1.1.min.js');
?>
"></script>
    <!--<![endif]-->
    <link href="<?php 
echo skin('Css/css.css');
?>
" rel="stylesheet" type="text/css"/>
    <script src="<?php 
echo skin('Js/home.js');
?>
"></script>
    <script src="<?php 
echo skin('Js/tab.js');
?>
"></script>

</head>

<body id="bodyie6">

<?php 
include Lib\Template::Tpl("top.html");
?>
<div class="h-partent">
    <?php 
include Lib\Template::Tpl("menu.html");
?>
    <div class="h-iframe">
Exemple #3
0
" rel="stylesheet" type="text/css" />

<!--[if IE]><script src="<?php 
echo jq('jquery-1.11.1.min.js');
?>
"></script><![endif]-->
<!--[if !IE]><!--><script src="<?php 
echo jq('jquery-2.1.1.min.js');
?>
"></script><!--<![endif]-->
<script src="<?php 
echo jq('ValidForm/validform.js');
?>
"></script>
<script src="<?php 
echo skin('js/common.js');
?>
"></script>

<script type="text/javascript">

  window.onload=function(){
        data=$(".form").Validform({
            tiptype:2,
            callback:function(data){
                if(data.status=="y"){
                    location.href =	"<?php 
echo app_url('/power/execution/re/1/message');
?>
"+data.message;
                }else{
Exemple #4
0
?>
" rel="stylesheet" type="text/css"/>
    <script src="<?php 
echo skin('Js/tab.js');
?>
"></script>
    <script src="<?php 
echo jq('ValidForm/validform.js');
?>
"></script>
    <script src="<?php 
echo skin('Js/dbmanage.js');
?>
"></script>
    <script src="<?php 
echo skin('Js/common.js');
?>
"></script>
    <style>
        .botton{width:60px;height:25px;border:1px solid #ccc;margin:2px 5px}
    </style>

</head>

<body>
<div id="main">
    <form name="checkboxform" method="post" action="" class="form">
        <div id="main_top">
            <dl id="article_ico">
                <dd class="art_ico_8"><a href="<?php 
echo app_url();
Exemple #5
0
function drawAdminTools_emailPanel($mailbox)
{
    global $conf_skin;
    global $addrlink;
    global $adm_email_login;
    global $adm_email_pass;
    $user_menu[] = array("text" => _("My e-mail"), "icon" => "box_wnb_nb_picto-mailboxes.gif", "type" => "link", "link" => "My Email");
    $user_menu[] = array("text" => _("Fetchmail"), "icon" => "box_wnb_nb_picto-mailinglists.gif", "type" => "link", "link" => "fetchmail");
    $logout = "<a href=\"" . $_SERVER["PHP_SELF"] . "?action=logout\">" . _("Logout") . "</a>";
    $mymenu = makeTreeMenu($user_menu, $addrlink, "" . $_SERVER["PHP_SELF"] . "?adm_email_login={$adm_email_login}&adm_email_pass={$adm_email_pass}", "addrlink");
    switch ($addrlink) {
        case "My Email":
            $title = _("Mailbox configuration: ");
            $panel = drawAdminTools_emailAccount($mailbox);
            break;
        case "antispam":
            $title = _("Protect your mailbox with efficient tools:");
            $panel = drawAntispamRules($mailbox);
            break;
        case "fetchmail":
            $title = _("Your list of imported mail");
            $panel = drawImportedMail($mailbox);
            break;
        case "quarantine":
            $title = _("Those mail are in quarantine, and were not delivered to your pop account:");
            $panel = drawQuarantine($mailbox);
            break;
        default:
            $title = _("Welcom to the email panel!");
            $panel = _("Login successfull. Please select a menu entry on the left...");
            break;
    }
    if (function_exists("layoutEmailPanel")) {
        $content = layoutEmailPanel($adm_email_login, "<br>" . $mymenu . "<center>{$logout}</center>", $title, $panel);
    } else {
        $mymenu_skin = skin($conf_skin, "<br>" . $mymenu . "<center>{$logout}</center>", $adm_email_login);
        $left = "<table width=\"1\" height=\"100%\"><tr>\n\t\t<td width=\"1\" height=\"1\">{$mymenu_skin}</td>\n</tr><tr>\n\t\t<td height=\"100%\">&nbsp;</td>\n</tr></table>";
        $right = skin($conf_skin, $panel, $title);
        $right = "<table width=\"100%\" height=\"100%\"><tr>\n\t\t<td width=\"100%\" height=\"100%\">{$right}</td>\n</tr><tr>\n\t<td height=\"1\">&nbsp;</td>\n</tr></table>";
        $content = "<table width=\"100%\" height=\"100%\"><tr>\n\t\t<td width=\"1\"  height=\"100%\">{$left}</td>\n\t\t<td width=\"100%\" height=\"100%\">{$right}</td>\n</tr></table>";
    }
    return $content;
    //	return drawAdminTools_emailAccount($mailbox);
}
Exemple #6
0
<?php

defined('TPL_INCLUDE') or exit('Access Denied');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>栏目管理</title>

    <link href="<?php 
echo skin('Css/css.css');
?>
" rel="stylesheet" type="text/css"/>
    <!--[if IE]>
    <script src="<?php 
echo jq('jquery-1.11.1.min.js');
?>
"></script><![endif]-->
    <!--[if !IE]><!-->
    <script src="<?php 
echo jq('jquery-2.1.1.min.js');
?>
"></script>
    <!--<![endif]-->
    <script src="<?php 
echo jq('ValidForm/validform.js');
?>
"></script>
    <script type="text/javascript">
Exemple #7
0
    exit;
}
if (isset($_GET["per-categories"])) {
    per_category_main();
    exit;
}
if (isset($_GET["per-categories-settings"])) {
    per_category_settings();
    exit;
}
if (isset($_POST["external_uri"])) {
    per_category_settings_save();
    exit;
}
if (isset($_GET["skin"])) {
    skin();
    exit;
}
if (isset($_POST["CATEGORY"])) {
    SAVE_SKIN();
    exit;
}
if (isset($_GET["unlock"])) {
    UNLOCK_SECTION();
    exit;
}
if (isset($_GET["skin-tabs"])) {
    skin_tabs();
    exit;
}
if (isset($_GET["skin-logo"])) {
    $text .= dtcFormLineDraw(_("Address (line3): "), "<input class=\"dtcDatagrid_input_alt_color\" size=\"40\" type=\"text\" name=\"addr3\" value=\"" . stripcslashes($b["addr3"]) . "\">", 0);
    $text .= dtcFormLineDraw(_("City: "), "<input class=\"dtcDatagrid_input_color\" size=\"40\" type=\"text\" name=\"city\" value=\"" . stripcslashes($b["city"]) . "\">");
    $text .= dtcFormLineDraw(_("Zipcode: "), "<input class=\"dtcDatagrid_input_alt_color\" size=\"40\" type=\"text\" name=\"zipcode\" value=\"" . stripcslashes($b["zipcode"]) . "\">", 0);
    $text .= dtcFormLineDraw(_("State: "), "<input class=\"dtcDatagrid_input_color\" size=\"40\" type=\"text\" name=\"state\" value=\"" . stripcslashes($b["state"]) . "\">");
    $text .= dtcFormLineDraw(_("Country: "), "<select class=\"dtcDatagrid_input_alt_color\" name=\"country\">" . cc_code_popup($b["country"]) . "</select>", 0);
    $text .= dtcFormLineDraw(_("Phone number: "), "<input class=\"dtcDatagrid_input_color\" size=\"40\" type=\"text\" name=\"phone\" value=\"" . stripcslashes($b["phone"]) . "\">");
    $text .= dtcFormLineDraw(_("Fax: "), "<input class=\"dtcDatagrid_input_alt_color\" size=\"40\" type=\"text\" name=\"fax\" value=\"" . stripcslashes($b["fax"]) . "\">", 0);
    $text .= dtcFormLineDraw(_("Email: "), "<input class=\"dtcDatagrid_input_color\" size=\"40\" type=\"text\" name=\"email\" value=\"" . $b["email"] . "\">");
    $text .= dtcFormLineDraw(_("Notes: "), "<textarea class=\"dtcDatagrid_input_alt_color\" cols=\"40\" rows=\"5\" name=\"custom_notes\">" . stripcslashes($b["custom_notes"]) . "</textarea>", 0);
    $text .= "<input type=\"hidden\" name=\"paiement_id\" value=\"" . $b["paiement_id"] . "\">";
    if ($has_payement == 1) {
        $text .= "<input type=\"hidden\" name=\"secpay_site\" value=\"" . $p["secpay_site"] . "\">";
        $text .= dtcFormLineDraw(_("Payment type: "), "<input class=\"dtcDatagrid_input_color\" size=\"40\" type=\"text\" name=\"paiement_type\" value=\"" . $p["paiement_type"] . "\">");
        $text .= dtcFormLineDraw(_("Payment validated: "), "<input class=\"dtcDatagrid_input_alt_color\" size=\"40\" type=\"text\" name=\"valid\" value=\"" . $p["valid"] . "\">", 0);
        $text .= dtcFormLineDraw(_("Payment site: "), "<input class=\"dtcDatagrid_input_color\" size=\"40\" type=\"text\" name=\"secpay_site\" value=\"" . $p["secpay_site"] . "\">");
        $text .= dtcFormLineDraw(_("Refund amount: "), "<input class=\"dtcDatagrid_input_alt_color\" size=\"40\" type=\"text\" name=\"refund_amount\" value=\"" . $p["refund_amount"] . "\">", 0);
        $text .= dtcFormLineDraw(_("Paiement cost: "), "<input class=\"dtcDatagrid_input_color\" size=\"40\" type=\"text\" name=\"paiement_cost\" value=\"" . $p["paiement_cost"] . "\">");
        $text .= dtcFormLineDraw(_("Paiement total: "), "<input class=\"dtcDatagrid_input_alt_color\" size=\"40\" type=\"text\" name=\"paiement_total\" value=\"" . $p["paiement_total"] . "\">", 0);
        $text .= dtcFormLineDraw(_("Vat rate: "), "<input class=\"dtcDatagrid_input_color\" size=\"40\" type=\"text\" name=\"vat_rate\" value=\"" . $p["vat_rate"] . "\">");
        $text .= dtcFormLineDraw(_("Vat total: "), "<input class=\"dtcDatagrid_input_alt_color\" size=\"40\" type=\"text\" name=\"vat_total\" value=\"" . $p["vat_total"] . "\">", 0);
    } else {
        $text .= dtcFormLineDraw(_("Payment site: "), _("Paiement not found!"));
    }
    $text .= dtcFormLineDraw(_("Shopper IP: "), $b["shopper_ip"]);
    $text .= "<input type=\"hidden\" name=\"shopper_ip\" value=\"" . $b["shopper_ip"] . "\">";
    $text .= "\n<tr><td align=\"right\"></td><td><div class=\"input_btn_container\" onMouseOver=\"this.className='input_btn_container-hover';\" onMouseOut=\"this.className='input_btn_container';\">\n <div class=\"input_btn_left\"></div>\n <div class=\"input_btn_mid\"><input class=\"input_btn\" type=\"submit\" value=\"" . _("Save") . "\"></div>\n <div class=\"input_btn_right\"></div>\n</div></form>";
}
$the_page[] = skin($conf_skin, $text, "User details:");
$pageContent = makeVerticalFrame($the_page);
$anotherFooter = anotherFooter("Footer content<br><br>");
echo anotherPage("admin:", "", "", makePreloads(), $anotherTopBanner, $anotherMenu, $pageContent, $anotherFooter);
Exemple #9
0
?>
"></script>
    <script src="<?php 
echo editer('kindeditor.js');
?>
"></script>
    <script src="<?php 
echo editer('lang/zh_CN.js');
?>
"></script>
    <script src="<?php 
echo skin('Js/common.js');
?>
"></script>
    <script src="<?php 
echo skin('Js/artDialog.js');
?>
"></script>
    <script type="text/javascript">
        $(function () {
            data = $(".form").Validform({
                tiptype: 2,
                callback: function (data) {

                    if (data.status == "y") {
                        location.href = "<?php 
echo app_url('/article/execution/re/1/message');
?>
" + data.message;
                    } else {
                        location.href = "<?php 
Exemple #10
0
	
	if(isset($_GET["smtp-parameters-js"])){SMTP_PARAMETERS_JS();exit;}
	if(isset($_GET["smtp-parameters-popup"])){SMTP_PARAMETERS_POPUP();exit;}
	if(isset($_POST["smtp_notifications"])){SMTP_PARAMETERS_SAVE();exit;}
	if(isset($_GET["test-smtp-js"])){tests_smtp_js();exit;}
	if(isset($_GET["smtp_sendto"])){tests_smtp();exit;}
	
	
	if(isset($_POST["UfdbGuardHTTPAllowUnblock"])){UNLOCK_SAVE();exit;}
	if(isset($_GET["EnableSquidGuardHTTPService"])){save();exit;}
	if(isset($_GET["tabs"])){tabs();exit;}
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["per-categories"])){per_category_main();exit;}
	if(isset($_GET["per-categories-settings"])){per_category_settings();exit;}
	if(isset($_POST["external_uri"])){per_category_settings_save();exit;}
	if(isset($_GET["skin"])){skin();exit;}
	if(isset($_POST["CATEGORY"])){SAVE_SKIN();exit;}
	if(isset($_GET["unlock"])){UNLOCK_SECTION();exit;}
	if(isset($_GET["skin-tabs"])){skin_tabs();exit;}
	if(isset($_GET["skin-logo"])){skin_logo();exit;}
js();	
	
function js(){
	$tpl=new templates();
	$page=CurrentPageName();
	$title=$tpl->_ENGINE_parse_body("{banned_page_webservice}");
	header("content-type: application/x-javascript");
	$html="
		YahooWin5('1071','$page?tabs=yes','$title');
	";
	echo $html;
Exemple #11
0
function skin_ClientPage()
{
    global $adm_pass;
    global $adm_login;
    global $conf_skin;
    global $page_metacontent;
    global $meta;
    global $confirm_javascript;
    global $java_script;
    global $skinCssString;
    global $console;
    ////////////////////////////////////
    // Create the top banner and menu //
    ////////////////////////////////////
    $anotherTopBanner = anotherTopBanner("DTC");
    $anotherLanguageSelection = anotherLanguageSelection();
    $lang_sel = skin($conf_skin, $anotherLanguageSelection, _("Language"));
    if ($adm_login != "" && isset($adm_login) && $adm_pass != "" && isset($adm_pass)) {
        // Fetch all the user informations, Print a nice error message if failure.
        $admin = fetchAdmin($adm_login, $adm_pass);
        if (($error = $admin["err"]) != 0) {
            $mesg = $admin["mesg"];
            $login_txt = _("Error") . " {$error} " . _("fetching admin: ") . "<font color=\"red\">{$mesg}</font><br />";
            $login_txt .= login_form();
            $login_skined = skin($conf_skin, $login_txt, _("Client panel:") . " " . _("Login"));
            $mypage = layout_login_and_languages($login_skined, $lang_sel);
        } else {
            // Draw the html forms
            $HTML_admin_edit_data = '<div class="box_wnb_content_container">' . drawAdminTools($admin) . '</div>';
            $mypage = $HTML_admin_edit_data;
        }
    } else {
        $login_txt = login_form();
        $mypage = skin($conf_skin, $login_txt, _("Client panel:") . " " . _("Login"));
    }
    echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" dir=\"ltr\" lang=\"en\" xml:lang=\"en\">\n<head>\n<title>DTC: Client: " . $_SERVER['SERVER_NAME'] . "</title>\n{$page_metacontent}\n{$meta}\n<link rel=\"stylesheet\" href=\"gfx/skin/paperboard/skin.css\" type=\"text/css\" media=\"all\" />\n</head>\n<body id=\"page\">\n\t<div id=\"outerwrapper\">\n\t\t<div id=\"wrapper\">\n\t\t\t" . makePreloads() . "\n\t\t\t{$confirm_javascript}\n\t\t\t{$java_script}\n\t\t\t{$skinCssString}\n\t\t\t" . anotherTopBanner("DTC", "yes") . "<div id=\"usernavbarreplacement\"></div>\n\t\t\t<table class=\"tht\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"thl-1\" nowrap=\"nowrap\">&nbsp;</td>\n\t\t\t\t\t<td class=\"thm-1 hleft\" nowrap=\"nowrap\">&nbsp;</td>\n\t\t\t\t\t<td class=\"thr-1\" nowrap=\"nowrap\">&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"bord-left\" nowrap=\"nowrap\"></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t" . $mypage . "\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"bord-right\" nowrap=\"nowrap\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"tbl-1\" nowrap=\"nowrap\"></td>\n\t\t\t\t\t<td class=\"tbm-1 hleft\" nowrap=\"nowrap\">&nbsp;</td>\n\t\t\t\t\t<td class=\"tbr-1\" nowrap=\"nowrap\"></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<div id=\"footer\">" . anotherFooter("Footer content<br /><br />") . "PaperBoard template for DTC made by <a href=\"http://www.labestiole.net\" title=\"la bestiole\" target=\"_blank\">cali</a></div>\n\t\t</div>\n\t</div>\n</body>\n</html>";
}
Exemple #12
0
?>
" rel="stylesheet" type="text/css" />

</head>

<body>
<div id="main">
	<div id="main_top">
		<b>网站信息</b>
	</div>
	<div id="art_body">
    	<table cellspacing="0" class="add_art">
        	<tr><th colspan="2"><h3>系统操作提示信息</h3></th></tr>
            <tr>
            	<td width="240"><img src="<?php 
echo skin('Image/duihao.png');
?>
" style="display:block; margin:20px auto" /></td>
            	<td style="font-size:40px; color:#131b26;"><?php 
if ($_GET['re'] == '1') {
    ?>
					<?php 
    echo urldecode($_GET['message']);
} else {
    echo urldecode($_GET['message']);
    ?>
					<?php 
}
?>
                </td>
            </tr>
Exemple #13
0
            $q = "SELECT * FROM {$pro_mysql_admin_table},{$pro_mysql_client_table} WHERE {$pro_mysql_client_table}.email='" . $_REQUEST["adm_lost_email"] . "';";
            $r = mysql_query($q) or die("Cannot query {$q} line " . __LINE__ . " file " . __FILE__ . " sql said: " . mysql_error());
            $n = mysql_num_rows($r);
            $recover_txt .= "<br><br>" . _("The following logins have been found to be related to this email address. Click on any of them to send your password to the email address:") . "<br><br>";
            for ($i = 0; $i < $n; $i++) {
                $a = mysql_fetch_array($r);
                $login = $a["adm_login"];
                if ($i != 0) {
                    $recover_txt .= " - ";
                }
                $recover_txt .= "<a href=\"" . $_SERVER["PHP_SELF"] . "?action=recover_lost_pass&adm_lost_login={$login}\">{$login}</a>";
            }
        }
    }
} else {
    $recover_l_txt = dtcFormTableAttrs();
    $recover_l_txt .= "<form action=\"" . $_SERVER["PHP_SELF"] . "\">\n<input type=\"hidden\" name=\"action\" value=\"recover_lost_pass\">";
    $recover_l_txt .= dtcFormLineDraw(_("Login:"******"<input type=\"text\" name=\"adm_lost_login\">", 0);
    $recover_l_txt .= dtcFromOkDraw() . "</table></form>";
    $recover_r_txt = dtcFormTableAttrs();
    $recover_r_txt .= "<form action=\"" . $_SERVER["PHP_SELF"] . "\">\n<input type=\"hidden\" name=\"action\" value=\"recover_lost_pass\">";
    $recover_r_txt .= dtcFormLineDraw(_("Email:"), "<input type=\"text\" name=\"adm_lost_email\">", 0);
    $recover_r_txt .= dtcFromOkDraw() . "</table></form>";
    $recover_txt .= '<table cellpadding="8" border="0"><tr><td>' . $recover_l_txt . "</td><td>" . $recover_r_txt . "</td></table>";
}
$mypage = skin($conf_skin, $recover_txt, _("Client panel:") . " " . _("Recover password"));
if (function_exists("skin_NewAccountPage")) {
    skin_NewAccountPage($mypage);
} else {
    echo anotherPage("Client:", "", "", makePreloads(), $anotherTopBanner, "", $mypage, anotherFooter(""));
}
Exemple #14
0
?>
"></script><![endif]-->
    <!--[if !IE]><!--><script src="<?php 
echo jq('jquery-2.1.1.min.js');
?>
"></script><!--<![endif]-->
    <link href="<?php 
echo skin('Css/css.css');
?>
" rel="stylesheet" type="text/css" />
    <script src="<?php 
echo skin('Js/tab.js');
?>
"></script>
    <script src="<?php 
echo skin('Js/checkAll.js');
?>
"></script>

</head>

<body>
<div id="main" style="margin-top:-10px; overflow:hidden;">
    <form name="checkboxform" method="post" action="" class="form">
        <div id="art_body" style="padding-top:0;">
            <div id="art_class">
                <ul>
                    <li class="art_ico_lm"><strong><a href="javascript:void(0)">日志列表</a></strong></li>
                </ul>
            </div>
            <div id="art_list">
Exemple #15
0
function skin_LayoutAdminPage()
{
    global $rub;
    global $adm_login;
    global $adm_pass;
    global $conf_session_expir_minute;
    global $pro_mysql_config_table;
    global $pro_mysql_tik_admins_table;
    global $conf_skin;
    global $top_commands;
    global $adm_random_pass;
    global $page_metacontent;
    global $meta;
    global $confirm_javascript;
    global $java_script;
    global $skinCssString;
    global $console;
    ///////////////////////
    // Make All the page //
    ///////////////////////
    switch ($rub) {
        case "crm":
            // CRM TOOL
            $admin_list = DTCRMlistClients();
            $client_editor = DTCRMeditClients();
            if (isset($_REQUEST["id"]) && $_REQUEST["id"] != "" && $_REQUEST["id"] != 0) {
                $client_editor .= DTCRMclientAdmins();
            }
            $zemain_content = '
<table class="box_wnb" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="box_wnb_nb" valign="top">
    	<div class="box_wnb_nb_title"><div class="box_wnb_nb_title_left"><div class="box_wnb_nb_title_right"><div class="box_wnb_nb_title_mid">' . _("Customers list") . '</div></div></div></div>
    	' . $admin_list . '
    </td>
    <td class="box_wnb_content" valign="top">
      <div class="box_wnb_content_container">
      <h2>' . _("Customer's address") . '</h2>
      ' . $client_editor . '
      </div>
    </td>
  </tr>
  <tr>
    <td class="box_wnb_nb_bottom"></td>
    <td class="box_wnb_content_bottom" valign="top"></td>
  </tr>
</table>';
            break;
        case "renewal":
            $out = drawRenewalTables();
            $zemain_content = skin($conf_skin, $out, _("Customer renewals"));
            break;
        case "monitor":
            // Monitor button
            $out = drawAdminMonitor();
            $zemain_content = skin($conf_skin, $out, _("Customer's bandwidth consumption"));
            break;
        case "graph":
            $zemain_content = skin($conf_skin, drawRrdtoolGraphs(), _("Server statistic graphs"));
            break;
        case "generate":
            // Gen Config Files
            $mainFrameCells[] = skin($conf_skin, $top_commands, _("Launching the configuration files generation"));
            $the_iframe = "<br><br>" . _("Please note that you need to create at least one email and one FTP account in order to have the daemon status working!") . "<br><IFRAME src=\"deamons_state.php\" width=\"100%\" height=\"135\"></iframe>";
            $mainFrameCells[] = skin($conf_skin, $the_iframe, _("Deamons states"));
            // fixed bug by seeb
            // The console
            $mainFrameCells[] = skinConsole();
            $zemain_content = makeVerticalFrame($mainFrameCells);
            break;
        case "config":
            // Global Config
            $zemain_content = '
<table class="box_wnb" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="box_wnb_nb" valign="top">
    	<div class="box_wnb_nb_title"><div class="box_wnb_nb_title_left"><div class="box_wnb_nb_title_right"><div class="box_wnb_nb_title_mid">' . _("Menu") . '</div></div></div></div>
    	' . drawDTCConfigMenu() . '
    </td>
    <td class="box_wnb_content" valign="top">
    	 <div class="box_wnb_content_container">
	  <h2>' . _("DTC Configuration") . '</h2>
' . drawDTCConfigForm() . '
	</div>
    </td>
  </tr>
  <tr>
    <td class="box_wnb_nb_bottom"></td>
    <td class="box_wnb_content_bottom" valign="top"></td>
  </tr>
</table>';
            break;
        case "product":
            $bla = productManager();
            $zemain_content = skin($conf_skin, $bla, _("Hosting product manager"));
            break;
        case "user":
            // User Config
        // User Config
        case "domain_config":
        case "adminedit":
        default:
            // No rub selected
            $bwoup_user_edit = bwoupUserEditForms($adm_login, $adm_pass);
            if (isset($adm_random_pass)) {
                $rand = $adm_random_pass;
            } else {
                $rand = getRandomValue();
                $adm_random_pass = $rand;
                $expirationTIME = mktime() + 60 * $conf_session_expir_minute;
                $q = "UPDATE {$pro_mysql_tik_admins_table} SET pass_next_req='{$rand}', pass_expire='{$expirationTIME}' WHERE pseudo='" . $_SERVER["PHP_AUTH_USER"] . "';";
                $r = mysql_query($q) or die("Cannot execute query \"{$q}\" !");
            }
            $skinedConsole = '<table cellpadding="0" cellspacing="0" class="console">
	  <tr><td class="console_title">' . _("Console output") . ' :</td>
	  </tr><tr>		<td class="console_output"><pre>' . $_SERVER['SERVER_NAME'] . ':&gt;_' . $console . '<br><span id="console_content" class="console_content"></span></pre></td></tr></table>';
            $adm_list = adminList($rand) . '
	  <div class="voider"></div>
	  <br /><br />
		<div class="voider"></div>';
            $zemain_content = '
<table class="box_wnb" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="box_wnb_nb" valign="top">
    	<div class="box_wnb_nb_title"><div class="box_wnb_nb_title_left"><div class="box_wnb_nb_title_right"><div class="box_wnb_nb_title_mid">' . _("Admins list") . '</div></div></div></div>
    	' . $adm_list . '
    </td>
    <td class="box_wnb_content" valign="top">
      <div class="box_wnb_content_container">
      <h2>' . _("User administration") . " {$adm_login}" . '</h2>
      ' . $bwoup_user_edit . $skinedConsole . '
      </div>
    </td>
  </tr>
  <tr>
    <td class="box_wnb_nb_bottom"></td>
    <td class="box_wnb_content_bottom" valign="top"></td>
  </tr>
</table>';
            break;
    }
    $dtc_main_menu = skin_Navbar();
    $anotherFooter = anotherFooter("Footer content<br><br>");
    echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html>\n<head>\n<title>DTC: Admin: " . $_SERVER['SERVER_NAME'] . "</title>\n{$page_metacontent}\n{$meta}\n</head>\n<body id=\"page\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n\t  <div id=\"outerwrapper\">\n    <div id=\"wrapper\">\n\n" . makePreloads() . "\n{$confirm_javascript}\n{$java_script}\n<link rel=\"stylesheet\" href=\"gfx/skin/bwoup/skin.css\" type=\"text/css\">\n{$skinCssString}\n\n" . anotherTopBanner("DTC", "yes") . $dtc_main_menu . "\n<div id=\"content\">" . $zemain_content . "</div>\n<div id=\"footer\">" . anotherFooter("Footer content<br><br>") . "</div>\n    </div>\n</div>\n</body>\n</html>";
}
Exemple #16
0
function drawAdminTools($admin)
{
    global $adm_login;
    global $adm_pass;
    global $edit_domain;
    global $whatdoiedit;
    global $domain_conf_submenu;
    global $addrlink;
    global $lang;
    global $dtcshared_path;
    global $dtc_use_text_menu;
    global $conf_skin;
    global $conf_use_registrar_api;
    global $conf_use_mail_alias_group;
    global $vps_node;
    global $vps_name;
    global $dedicated_server_hostname;
    global $server_subscreen;
    global $vps_subcommand;
    $add_array = explode("/", $addrlink);
    $doms_txt = "";
    if (isset($admin["data"])) {
        $admin_data = $admin["data"];
        $nbr_domain = sizeof($admin_data);
    } else {
        $nbr_domain = 0;
    }
    if (isset($admin["vps"])) {
        $admin_vps = $admin["vps"];
        $nbr_vps = sizeof($admin_vps);
    } else {
        $nbr_vps = 0;
    }
    if (isset($admin["dedicated"])) {
        $admin_dedicated = $admin["dedicated"];
        $nbr_dedicated = sizeof($admin_dedicated);
    } else {
        $nbr_dedicated = 0;
    }
    $admin_info = $admin["info"];
    $adm_cur_pass = $admin_info["adm_pass"];
    $adm_path = $admin_info["path"];
    $resseller_flag = $admin_info["resseller_flag"];
    $ssh_login_flag = $admin_info["ssh_login_flag"];
    $ftp_login_flag = $admin_info["ftp_login_flag"];
    $pkg_install_flag = $admin_info["pkg_install_flag"];
    $allow_dns_and_mx_change = $admin_info["allow_dns_and_mx_change"];
    $allow_mailing_list_edit = $admin_info["allow_mailing_list_edit"];
    $allow_subdomain_edit = $admin_info["allow_subdomain_edit"];
    unset($user_ZEmenu);
    if ($nbr_domain > 0) {
        $user_ZEmenu[] = array("text" => _("Statistics"), "icon" => "box_wnb_nb_picto-statistics.gif", "type" => "link", "link" => "stats");
    }
    $user_ZEmenu[] = array("text" => _("Past payments"), "icon" => "box_wnb_nb_picto-pastpayments.gif", "type" => "link", "link" => "invoices");
    $user_ZEmenu[] = array("text" => _("Add a domain or service"), "icon" => "box_wnb_nb_picto-addadomainname.gif", "type" => "link", "link" => "adddomain");
    if ($conf_use_registrar_api == "yes" && $nbr_domain > 0) {
        $user_ZEmenu[] = array("text" => _("DNS Nick handles"), "icon" => "box_wnb_nb_picto-nickhandles.gif", "type" => "link", "link" => "nickhandles");
        $user_ZEmenu[] = array("text" => _("Name servers"), "icon" => "box_wnb_nb_picto-nameservers.gif", "type" => "link", "link" => "nameservers");
    }
    $user_menu[] = array("text" => _("My account"), "icon" => "box_wnb_nb_picto-general.gif", "type" => "menu", "link" => "myaccount", "sub" => $user_ZEmenu);
    // Draw all vps
    for ($i = 0; $i < $nbr_vps; $i++) {
        $vps_submenu = array();
        $vps_submenu[] = array("text" => _("Monitoring"), "icon" => "box_wnb_nb_picto-statistics.gif", "type" => "link", "link" => "monitor");
        $vps_submenu[] = array("text" => _("My VPS usage"), "icon" => "box_wnb_nb_picto-statistics.gif", "type" => "link", "link" => "rrdgraphs");
        $vps_submenu[] = array("text" => _("My VPS vs. others"), "icon" => "box_wnb_nb_picto-statistics.gif", "type" => "link", "link" => "dom0graphs");
        $vps_submenu[] = array("text" => _("Installation"), "icon" => "box_wnb_nb_picto-packageinstaller.gif", "type" => "link", "link" => "installation");
        $user_menu[] = array("text" => $admin_vps[$i]["vps_server_hostname"] . ":" . $admin_vps[$i]["vps_xen_name"], "icon" => "box_wnb_nb_picto-vpsservers.gif", "type" => "menu", "link" => "vps:" . $admin_vps[$i]["vps_server_hostname"] . ":" . $admin_vps[$i]["vps_xen_name"], "sub" => $vps_submenu);
    }
    // Draw all the dedicated servers
    for ($i = 0; $i < $nbr_dedicated; $i++) {
        $user_menu[] = array("text" => $admin_dedicated[$i]["server_hostname"], "icon" => "box_wnb_nb_picto-dedicatedservers.gif", "type" => "link", "link" => "server:" . $admin_dedicated[$i]["server_hostname"]);
    }
    // Generate the admin tools
    $doms_txt .= "<b>";
    unset($selected_domain);
    $not_selected_domains = array();
    for ($i = 0; $i < $nbr_domain; $i++) {
        $dom = $admin_data[$i]["name"];
        $domain_parking = $admin_data[$i]["domain_parking"];
        unset($domain_conf_submenu);
        if ($conf_use_registrar_api == "yes") {
            $domain_conf_submenu[] = array("text" => _("Whois"), "icon" => "box_wnb_nb_picto-whois.gif", "type" => "link", "link" => "whois");
        }
        $domain_conf_submenu[] = array("text" => _("Statistics"), "icon" => "box_wnb_nb_picto-statistics.gif", "type" => "link", "link" => "stats");
        if ($allow_dns_and_mx_change == "yes") {
            $domain_conf_submenu[] = array("text" => _("DNS and MX"), "icon" => "box_wnb_nb_picto-mxnsservers.gif", "type" => "link", "link" => "dns");
        }
        if ($admin_data[$i]["primary_dns"] == "default") {
            if ($domain_parking == "no-parking") {
                if ($allow_subdomain_edit == "yes") {
                    $domain_conf_submenu[] = array("text" => _("Sub-domains"), "icon" => "box_wnb_nb_picto-subdomains.gif", "type" => "link", "link" => "subdomains");
                }
                if ($ftp_login_flag == "yes") {
                    $domain_conf_submenu[] = array("text" => _("FTP accounts"), "icon" => "box_wnb_nb_picto-ftpaccounts.gif", "type" => "link", "link" => "ftp-accounts");
                }
                if ($ssh_login_flag == "yes") {
                    $domain_conf_submenu[] = array("text" => _("SSH accounts"), "icon" => "box_wnb_nb_picto-sshaccounts.gif", "type" => "link", "link" => "ssh-accounts");
                }
                if ($pkg_install_flag == "yes") {
                    $domain_conf_submenu[] = array("text" => _("Package installer"), "icon" => "box_wnb_nb_picto-packageinstaller.gif", "type" => "link", "link" => "package-installer");
                }
            }
        }
        if ($admin_data[$i]["primary_mx"] == "default" && $domain_parking == "no-parking") {
            $domain_conf_submenu[] = array("text" => _("Mailboxes"), "icon" => "box_wnb_nb_picto-mailboxes.gif", "type" => "link", "link" => "mailboxs");
        }
        if ($admin_data[$i]["primary_mx"] == "default" && $domain_parking == "no-parking" && $conf_use_mail_alias_group == "yes" && $allow_mailing_list_edit == "yes") {
            $domain_conf_submenu[] = array("text" => _("Mail Groups"), "icon" => "box_wnb_nb_picto-mailgroups.gif", "type" => "link", "link" => "mailaliases");
        }
        if ($admin_data[$i]["primary_mx"] == "default" && $domain_parking == "no-parking" && $allow_mailing_list_edit == "yes") {
            $domain_conf_submenu[] = array("text" => _("Mailing lists"), "icon" => "box_wnb_nb_picto-mailinglists.gif", "type" => "link", "link" => "mailing-lists");
        }
        //udns.us add
        // This is to be re-written from scratch, has many holes.
        //		if($admin_data[$i]["primary_mx"] == "default" && $domain_parking == "no-parking"){
        //			$domain_conf_submenu[] = array(
        //				"text" => $txt_domain_tools[$lang],
        //				"type" => "link",
        //				"link" => "tools");
        //		}
        //udns.us /add
        if ($add_array[0] == $dom) {
            $selected_domain = array("text" => "{$dom}", "icon" => "box_wnb_nb_picto-servers.gif", "type" => "menu", "link" => "{$dom}", "sub" => $domain_conf_submenu);
        } else {
            $not_selected_domains[] = array("text" => "{$dom}", "icon" => "box_wnb_nb_picto-servers.gif", "type" => "menu", "link" => "{$dom}", "sub" => $domain_conf_submenu);
        }
    }
    if (isset($selected_domain)) {
        $user_menu[] = $selected_domain;
    }
    $nbr_remaining = sizeof($not_selected_domains);
    for ($i = 0; $i < $nbr_remaining; $i++) {
        $user_menu[] = $not_selected_domains[$i];
    }
    if ($nbr_domain > 0) {
        $user_menu[] = array("text" => _("Databases"), "icon" => "box_wnb_nb_picto-database.gif", "type" => "link", "link" => "database");
        if (file_exists("/usr/share/extplorer/index.php")) {
            $user_menu[] = array("text" => _("File manager"), "icon" => "box_wnb_nb_picto-database.gif", "type" => "link", "link" => "filemang");
        }
    }
    if ($resseller_flag == "yes") {
        $user_menu[] = array("text" => _("Sub-accounts (reseller)"), "icon" => "box_wnb_nb_picto-resellers.gif", "type" => "link", "link" => "reseller");
    }
    $user_menu[] = array("text" => _("Password"), "icon" => "box_wnb_nb_picto-passwords.gif", "type" => "link", "link" => "password");
    $user_menu[] = array("text" => _("Support tickets"), "icon" => "box_wnb_nb_picto-supporttickets.gif", "type" => "link", "link" => "ticket");
    $user_menu[] = array("text" => _("Help"), "icon" => "box_wnb_nb_picto-help.gif", "type" => "link", "link" => "help");
    $mymenu = makeTreeMenu($user_menu, $addrlink, "" . $_SERVER["PHP_SELF"] . "?adm_login={$adm_login}&adm_pass={$adm_pass}", "addrlink");
    $mymenu .= "<div align=\"center\" class=\"box_wnb_nb_content\"><a href=\"" . $_SERVER["PHP_SELF"] . "?\">" . _("Logout") . "</a>";
    if ($dtc_use_text_menu == "no") {
        $mymenu .= " - <a href=\"" . $_SERVER["PHP_SELF"] . "?adm_login={$adm_login}&adm_pass={$adm_pass}&addlink={$addrlink}&use_text_menu=yes\">" . _("Use text menu") . "</a>";
    } else {
        $mymenu .= " - <a href=\"" . $_SERVER["PHP_SELF"] . "?adm_login={$adm_login}&adm_pass={$adm_pass}&addlink={$addrlink}&use_text_menu=no\">" . _("Use image menu") . "</a>";
    }
    $mymenu .= "</div>";
    $web_editor = "";
    if (isset($addrlink) && $addrlink != "") {
        if (isset($admin_data)) {
            $num_domain = AdminTool_findDomainNum($edit_domain, $admin_data);
            $eddomain = @$admin_data[$num_domain];
        } else {
            $num_domain = 0;
        }
        if (isset($vps_node)) {
            $vps_founded = 0;
            for ($i = 0; $i < $nbr_vps; $i++) {
                if ($vps_name == $admin_vps[$i]["vps_xen_name"] && $vps_node == $admin_vps[$i]["vps_server_hostname"]) {
                    $vps_order_number = $i;
                    $vps_founded = 1;
                }
            }
            $web_editor .= "<img src=\"gfx/toolstitles/virtual-server.png\" align=\"left\"><font size=\"+2\"><b><u>VPS {$vps_name}:{$vps_node}</u></b><br></font>";
            if ($vps_founded) {
                switch ($vps_subcommand) {
                    case "monitor":
                        $web_editor .= drawAdminTools_VPSMonitor($admin, $admin["vps"][$vps_order_number]);
                        break;
                    case "rrdgraphs":
                        $web_editor .= drawAdminTools_VPSRRDGraphs($admin, $admin["vps"][$vps_order_number]);
                        break;
                    case "dom0graphs":
                        $web_editor .= drawAdminTools_dm0RRDGraphs($admin, $admin["vps"][$vps_order_number]);
                        break;
                    case "installation":
                        $web_editor .= drawAdminTools_VPSInstallation($admin, $admin["vps"][$vps_order_number]);
                        break;
                    default:
                        $web_editor .= drawAdminTools_VPS($admin, $admin["vps"][$vps_order_number]);
                        break;
                }
            } else {
                $web_editor .= "VPS not found!";
            }
            $title = _("Virtual Private Server") . " {$vps_name} " . _("running on") . " {$vps_node}";
        } else {
            if (substr($addrlink, 0, 7) == "server:") {
                $web_editor .= drawAdminTools_Dedicated($admin, $dedicated_server_hostname);
                $title = _("Dedicated server") . ": {$dedicated_server_hostname}";
            } else {
                if (@$add_array[1] == "mailboxs") {
                    $web_editor .= "<img src=\"gfx/toolstitles/mailboxs.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Mailboxes:") . "</u></b><br></font>";
                    $web_editor .= drawAdminTools_Emails($eddomain);
                    $title = _("Mailboxes of ") . $edit_domain;
                } else {
                    if (@$add_array[1] == "mailaliases") {
                        $web_editor .= "<img src=\"gfx/toolstitles/mailaliasgroup.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Mail Groups:") . "</u></b><br></font>";
                        $web_editor .= drawAdminTools_Aliases($eddomain);
                        $title = _("Mail groups of ") . $edit_domain;
                    } else {
                        if (@$add_array[1] == "mailing-lists") {
                            $web_editor .= "<img src=\"gfx/toolstitles/mailing-lists.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Mailing lists:") . "</u></b><br></font>";
                            $web_editor .= drawAdminTools_MailingLists($eddomain);
                            $title = _("Edit mailing lists of domain:") . $edit_domain;
                            //udns.us add
                        } else {
                            if (@$add_array[1] == "tools") {
                                $web_editor .= "<img src=\"gfx/toolstitles/tools.png\" align=\"left\"><font size=\"+2\"><b><u>Tools:</u></b><br></font>";
                                $web_editor .= drawAdminTools_Tools($eddomain);
                                // To be translated:
                                $title = _("Domain Tools");
                                //udns.us /add
                            } else {
                                if (@$add_array[1] == "dns") {
                                    $web_editor .= "<img src=\"gfx/toolstitles/nameservers.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Name servers:") . "</u></b><br></font>";
                                    $web_editor .= drawAdminTools_DomainDNS($admin, $eddomain);
                                    $title = _("DNS config of:") . " " . $edit_domain;
                                } else {
                                    if (@$add_array[1] == "invoices") {
                                        $web_editor .= "<img src=\"gfx/toolstitles/stats.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Invoices") . ":</u></b><br></font>";
                                        $web_editor .= drawAdminTools_Invoices($admin);
                                        $title = _("Invoices");
                                    } else {
                                        if (@$add_array[1] == "stats") {
                                            if ($add_array[0] == "myaccount") {
                                                $web_editor .= "<img src=\"gfx/toolstitles/stats.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Statistics:") . "</u></b><br></font>";
                                                $web_editor .= drawAdminTools_AdminStats($admin);
                                                $title = _("My account global statistics");
                                            } else {
                                                $web_editor .= "<img src=\"gfx/toolstitles/stats.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Statistics:") . "</u></b><br></font>";
                                                $web_editor .= drawAdminTools_DomainStats($admin, $eddomain);
                                                $title = _("Statistics of domain:") . " " . $edit_domain;
                                            }
                                        } else {
                                            if (@$add_array[1] == "whois") {
                                                $web_editor .= "<img src=\"gfx/toolstitles/nickhandles.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Whois:") . "</u></b><br></font>";
                                                $web_editor .= drawAdminTools_Whois($admin, $eddomain);
                                                $title = _("Whois of:") . " " . $edit_domain;
                                            } else {
                                                if (@$add_array[1] == "subdomains") {
                                                    $web_editor .= "<img src=\"gfx/toolstitles/subdomains.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Subdomains:") . "</u></b><br></font>";
                                                    $web_editor .= drawAdminTools_Subdomain($admin, $eddomain);
                                                    $title = _("Subdomains of ") . $edit_domain;
                                                } else {
                                                    if (@$add_array[1] == "ftp-accounts") {
                                                        $web_editor .= "<img src=\"gfx/toolstitles/ftp-accounts.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("FTP accounts") . "</u></b><br></font>";
                                                        $web_editor .= drawAdminTools_Ftp($eddomain, $adm_path);
                                                        $title = _("FTP accounts of ") . $edit_domain;
                                                    } else {
                                                        if (@$add_array[1] == "ssh-accounts") {
                                                            $web_editor .= "<img src=\"gfx/toolstitles/ssh-accounts.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("SSH accounts:") . "</u></b><br></font>";
                                                            $web_editor .= drawAdminTools_SSH($eddomain, $adm_path);
                                                            $title = _("SSH accounts of ") . $edit_domain;
                                                        } else {
                                                            if (@$add_array[1] == "package-installer") {
                                                                $web_editor .= "<img src=\"gfx/toolstitles/package-installer.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Package installer:") . "</u></b><br></font>";
                                                                $web_editor .= drawAdminTools_PackageInstaller($eddomain, $adm_path);
                                                                $title = _("Package") . ": " . $edit_domain;
                                                            } else {
                                                                if (@$add_array[1] == "nickhandles") {
                                                                    $web_editor .= "<img src=\"gfx/toolstitles/nickhandles.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("DNS Nick handles") . "</u></b><br></font>";
                                                                    $web_editor .= drawAdminTools_NickHandles($admin);
                                                                    $title = _("Internet Whois Nick Handles management:");
                                                                } else {
                                                                    if (@$add_array[1] == "adddomain") {
                                                                        $web_editor .= "<img src=\"gfx/toolstitles/adddomain.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Add a domain or service:") . "</u></b><br></font>";
                                                                        $web_editor .= drawAdminTools_AddDomain($admin);
                                                                        $title = _("Add a domain name to my account");
                                                                    } else {
                                                                        if (@$add_array[1] == "nameservers") {
                                                                            $web_editor .= "<img src=\"gfx/toolstitles/nameservers.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Name servers:") . "</u></b><br></font>";
                                                                            $web_editor .= drawAdminTools_NameServers($admin);
                                                                            $title = _("Manage my name servers:");
                                                                        } else {
                                                                            if ($add_array[0] == "myaccount") {
                                                                                $web_editor .= "<img src=\"gfx/toolstitles/my-account.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Statistics:") . "</u></b><br></font>";
                                                                                $web_editor .= drawAdminTools_MyAccount($admin);
                                                                                $title = _("My Account information:");
                                                                            } else {
                                                                                if ($add_array[0] == "database") {
                                                                                    $web_editor .= "<img src=\"gfx/toolstitles/databases.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Databases:") . "</u></b><br></font>";
                                                                                    $web_editor .= drawDataBase("");
                                                                                    $title = _("Your databases");
                                                                                } else {
                                                                                    if ($add_array[0] == "filemang") {
                                                                                        $web_editor .= "<img src=\"gfx/toolstitles/databases.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("File manager:") . "</u></b><br></font>";
                                                                                        $web_editor .= "<table width=\"100%\" height=\"100%\" border=\"0\"><tr>\n\t\t\t\t\t<td width=\"1\" height=\"100%\"><img width=\"1\" height=\"600\" src=\"gfx/skin/bwoup/gfx/spacer.gif\"></td>\n\t\t\t\t\t<td width=\"100%\" height=\"100%\"><iframe width=\"100%\" height=\"100%\" src=\"/extplorer/\"></iframe></td>\n\t\t\t\t</tr></table>";
                                                                                        $title = _("eXtplorer web file manager");
                                                                                    } else {
                                                                                        if ($add_array[0] == "reseller") {
                                                                                            $web_editor .= "<img src=\"gfx/toolstitles/reseller.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Sub-accounts (reseller):") . "</u></b><br></font>";
                                                                                            $web_editor .= drawReseller($admin);
                                                                                            $title = _("Resseller child accounts");
                                                                                        } else {
                                                                                            if ($add_array[0] == "password") {
                                                                                                $web_editor .= "<img src=\"gfx/toolstitles/password.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Password:"******"</u></b><br></font>";
                                                                                                $web_editor .= drawPasswordChange();
                                                                                                $title = _("Password");
                                                                                            } else {
                                                                                                if ($add_array[0] == "ticket") {
                                                                                                    $web_editor .= "<img src=\"gfx/toolstitles/ticket.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Support tickets:") . "</u></b><br></font>";
                                                                                                    $web_editor .= drawTickets($admin);
                                                                                                    $title = _("Support ticket system");
                                                                                                } else {
                                                                                                    if ($add_array[0] == "help") {
                                                                                                        $web_editor .= "<img src=\"gfx/toolstitles/help.png\" align=\"left\"><font size=\"+2\"><b><u>" . _("Help:") . "</u></b><br></font>";
                                                                                                        $web_editor .= _("<font face=\"Arial, Verdana\">\n<center><font size=\"+2\"><u><b>ONLINE DTC HELP</b></u></font></center><br><br>\n<div align=\"justify\">\n<font size=\"+1\"><u>1. What is DTC</u></font><br><br>\nDTC is a tool we made especialy for you. With it, you can take the control of your domain administration : you can manage all your\nsubdomains, emails, ftp or ssh accounts, and manage your VPS. DTC does also billing and invoices, plus many other things.<br><br>\n\nAll this tool and all the software it uses and configure have been release under the <a href=\"http://www.gnu.org/\">GPL</a>\n(GNU Public Licence), which means that you can have a copy of this interface source code, modify it and use it as you wish, as long as\nyou redistribute all thoses changes. We (at GPLHost) believe in the Free Software effort, and we hope this participation will encourage\nother developpements. We consider that because we use only open-source software for our hosting service, it is normal to redistribute\nour developpements as well.<br><br>\n\nIf you want to know more about DTC, you can visit this URL: <a href=\"http://www.gplhost.com/software-dtc.html\">DTC home page</a>.\n\n<font size=\"+1\"><u>2. Emails</u></font><br>\n<u>2.1. What will it do ?</u><br><br>\nYou can add, delete or modify a mailbox with this tool.<br><br>\n\n<u>2.2. Redirection and local delivery</u><br><br>\nEach mailbox can be redirected to one or more email addresses. This means that when a message is recieved, it is forwared to one\nor two email adresse(s). The &quote;deliver locally&quote; checkbox tells wether or not all message for this mailbox will be written on\nour hard disk, so thenafter you will be able to read your messages using a mail client, connecting to our server. Don't forget to\ncheckup your mails often if you have trafic, because the mailbox are included in the quota<br><br>\n\n<u>2.3. Delay when adding / deleting accounts</u><br><br>\nWhen you add or delete a mail account, don't expect it to work immediatly: you will have to wait until the next cron job to start, so the\nmail, ssh or web server reloads it's database.<br><br>\n\n<u>2.4. Other tools for email</u><br><br>\nDTC doesn't only have email accounts. It also handles mailing lists using MLMMJ and mail alias groups to be able to have one email\nredirected to many other addresses.\n\n<font size=\"+1\"><u>3. Subdomains</u></font><br>\n<u>3.1. What will it do ?</u><br><br>\nThis part of the interface is for configurating your somain's sites, which means that you will be able to populate your web site with url\nof the form:\n<pre>\nhttp://anything.u.want.mydomain.com\n</pre>\n\n<u>3.2. What is the default subdomain ?</u><br><br>\nWhe someone trys to contact your web site with an URL without a subdomain, he is redirected to the subdomain you said it was the default.\nIn other words, if you tell that:\n<pre>\nwww\n</pre>\nis the default subdomain, someone that trys to connect using an url starting with:\n<pre>\nhttp://mydomain.com\n</pre>\nwill be redirected to:\n<pre>\nhttp://www.mydomain.com\n</pre>\n\nIn fact, the URL is kept, and no URL redirection in a HTML page has been created, but simply, a website with that URL has been configurated\nto the same location of the &quote;www&quote; subdomain, so it accesses the same html (or php) files, and shares the same log file.<br><br>\n\n<u>3.3. Subdomains generated by default</u><br><br>\nBecause you might expect to have these subdomains for other services than web already working by default, the following subdomains will\nresolve to the same IP address as your web site, even if you didn't add them:\n<ul><li>ftp</li>\n<li>pop</li>\n<li>smtp</li>\n<li>mail</li>\n</ul>\n\n<u>3.4. Delay when adding / deleting subdomain</u><br><br>\nLike for mail, any action here will take up to 10 minutes to take effect.<br><br>\n\n<u>3.6. Trafic statistics for your subdomains</u><br><br>\nBecause all your trafic is loged, we calculate the overall last 12 month statistics using <a href=\"http://www.mrunix.net/webalizer/\">\nwebalizer</a>. The statistics are calculated each days (this is when there is less trafic), and can be reach under the \"/stats\" directory\non each subdomains. That means that if you have registerd :\n<pre>\nhttp://www.mydomain.com\n</pre>\nall statistics will be generated under :\n<pre>\nhttp://www.mydomain.com/stats/\n</pre>\n\nIf you wish, you can protect this address with a login and password.\n\n<font size=\"+1\"><u>4. FTP accounts</u></font><br>\n<u>4.1. What will it do ?</u><br><br>\nTo have your page working and running, you have to upload them. But because you may not be only one to work on your web site, you may want to\nhave more that one FTP account for accessing your web site. DTC will be the tool for managing thoses accounts and passwords.<br><br>\n\n<u>4.2. Delay when adding / deleting FTP accounts</u><br><br>\nBecause DTC uses ProFTP or pure-ftpd with a special module for handling accounts in a MySql database, all changes to your FTP accounts take\neffect in realtime.<br><br>\n\n</div>\n</font>") . "<pre><a href=\"http://www.gplhost.com\">\n   _____       _____________   (c) 2oo3.2oo8     _____  s!   ____  ___|    .___\n _( ___/______(____     /  |______|    |________(    /______(  _/__\\___    ___/\n|   \\___   \\_    |/    /   |\\    \\_    ___   \\_    ___   \\________   \\|    |   \n|    |/     /    _____/    |/     /    |/     /    |/     /    |/     /    |   \n|___________\\    |    |__________/|____|     /|___________\\___________\\GPL |   \n     Open source | hosting worldwide  /_____/                         |HOST.\n</a></pre>";
                                                                                                        $title = _("Online DTC help");
                                                                                                    } else {
                                                                                                        $web_editor .= "<img src=\"gfx/toolstitles/domains.png\" align=\"left\"><font size=\"+2\"><b><u>{$addrlink}:</u></b><br></font>";
                                                                                                        $web_editor .= drawAdminTools_DomainInfo($admin, $eddomain);
                                                                                                        $title = _("General information of ") . $edit_domain;
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        $edition = skin($conf_skin, $web_editor, $title);
    } else {
        $edition = "";
        $title = "";
    }
    if (function_exists("skin_LayoutClientPage")) {
        return skin_LayoutClientPage($mymenu, $web_editor, $title);
    } else {
        return skin_LayoutClientPage_Default($mymenu, $web_editor, $title);
    }
}
        $proceed = "no";
    }
}
if ($proceed == "yes") {
    if (isset($_REQUEST["payment_type"]) && $_REQUEST["payment_type"] == "cheque") {
        $payment_type = 'cheque';
        $pending_reason = "Cheque";
    } else {
        $payment_type = 'wire';
        $pending_reason = "Wire transfer";
    }
    $q = "UPDATE {$pro_mysql_pay_table} SET paiement_type='{$payment_type}',valid='pending',pending_reason='{$pending_reason}' WHERE hash_check_key='" . $_REQUEST["hash_check"] . "' AND id='" . $_REQUEST["item_id"] . "'";
    $r = mysql_query($q) or die("Cannot query {$q} line " . __LINE__ . " file " . __FILE__ . " sql said: " . mysql_error());
}
// Display the payment infos
if ($proceed == "yes") {
    if (isset($_REQUEST["payment_type"]) && $_REQUEST["payment_type"] == "cheque") {
        $form = "<u>" . _("Cheques shall be written to be paid only to:") . "</u><br>" . $secpayconf_cheques_to_label . "<br><br>";
        $form .= "<u>" . _("Cheques shall be sent to:") . "</u><br><pre>" . $secpayconf_cheques_send_address . "</pre><br><br>";
    } else {
        $form = "<u>" . _("Wire transfers shall be made to: ") . "</u><br><pre>" . $secpayconf_wiretransfers_bank_details . "</pre><br><br>";
    }
    $form .= "<b>" . _("Thanks for your order. Your order has been set on hold until someone checks for your payment.") . "</b>  <a href=\"/\">" . _("Continue") . "</a><br><br>";
}
$login_skined = skin($conf_skin, $form, _("Register a new account"));
$mypage = layout_login_and_languages($login_skined, $lang_sel);
if (function_exists("skin_NewAccountPage")) {
    skin_NewAccountPage($login_skined);
} else {
    echo anotherPage("Client:", "", "", makePreloads(), $anotherTopBanner, "", $mypage, anotherFooter(""));
}
function userEditForms($adm_login, $adm_pass)
{
    global $adm_random_pass;
    global $conf_skin;
    global $addrlink;
    global $rub;
    $ret["err"] = 0;
    $ret["mesg"] = "No error";
    if (isset($adm_login) && $adm_login != "" && isset($adm_pass) && $adm_pass != "") {
        // Fetch all the selected user informations, Print a nice error message if failure.
        $admin = fetchAdmin($adm_login, $adm_pass);
        if (isset($adm_random_pass)) {
            $pass = $adm_random_pass;
        } else {
            $pass = $adm_pass;
        }
        if (($error = $admin["err"]) != 0) {
            // now print out all the stuff from our HTTP headers
            //$input = array_merge($_GET,    $_POST,
            //     $_COOKIE, $_SERVER,
            //     $_ENV,    $_FILES,
            //     isset($_SESSION) ? $_SESSION : array());
            //foreach ($input as $k => $v) {
            //	echo "$k - $input[$k]\n";
            //}
            echo "Error fetching admin : {$error} line " . __LINE__ . " file " . __FILE__;
            $ret["err"] = $admin["err"];
            $ret["mesg"] = $admin["mesg"];
            return $ret;
        }
        $iface_select = "<table height=\"1\" border=\"0\" width=\"100%\">";
        $iface_select .= "<tr><td width=\"33%\" valign=\"top\"><center>";
        if ($rub != "user" && $rub != "") {
            $iface_select .= "<a href=\"?rub=user&adm_login={$adm_login}&adm_pass={$pass}\">";
        }
        $iface_select .= "<img src=\"gfx/menu/client-interface.png\" width=\"48\" height=\"48\" border=\"0\"><br>\n" . _("Client interface");
        if ($rub != "user" && $rub != "") {
            $iface_select .= "</a>";
        }
        $iface_select .= "</center></td><td width=\"33%\" valign=\"top\"><center>";
        if ($rub != "domain_config") {
            $iface_select .= "<a href=\"?rub=domain_config&adm_login={$adm_login}&adm_pass={$pass}\">";
        }
        $iface_select .= "<img src=\"gfx/menu/domain-config.png\" width=\"48\" height=\"48\" border=\"0\"><br>\n" . _("Domain config");
        if ($rub != "domain_config") {
            $iface_select .= "</a>";
        }
        $iface_select .= "</center></td><td width=\"33%\" valign=\"top\"><center>";
        if ($rub != "adminedit") {
            $iface_select .= "<a href=\"?rub=adminedit&adm_login={$adm_login}&adm_pass={$pass}\">";
        }
        $iface_select .= "<img src=\"gfx/menu/user-editor.png\" width=\"48\" height=\"48\" border=\"0\"><br>\n" . _("Admin editor");
        if ($rub != "adminedit") {
            $iface_select .= "</a>";
        }
        $iface_select .= "</center></td></tr></table>";
        $iface_skined = skin($conf_skin, $iface_select, _("User administration") . " {$adm_login}");
        //fix up the $adm_login in case it changed because of session vars:
        //in case users play silly bugger with the "GET" variables
        $adm_login = $admin["info"]["adm_login"];
        // Draw the html forms
        if (isset($rub) && $rub == "adminedit") {
            $HTML_admin_edit_info = drawEditAdmin($admin);
            $user_config = skin($conf_skin, $HTML_admin_edit_info, _("Configuration of the virtual administrator") . "<i>\"{$adm_login}\"</i>");
            //			return $user_config;
        } else {
            if (isset($rub) && $rub == "domain_config") {
                $HTML_admin_domain_config = drawDomainConfig($admin);
                $user_config = skin($conf_skin, $HTML_admin_domain_config, _("Configuration of domains for") . " <i>\"{$adm_login}\"</i>");
            } else {
                $HTML_admin_edit_data = drawAdminTools($admin);
                $user_config = skin($conf_skin, $HTML_admin_edit_data, _("Domains for") . " " . $adm_login);
                //			return $user_tools;
            }
        }
        // All thoses tools in a simple table
        return "<table width=\"100%\" height=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n\t<tr>\n\t\t<tr><td width=\"100%\">{$iface_skined}</td></tr>\n\t\t<tr><td width=\"100%\">{$user_config}</td></tr>\n\t\t<tr><td height=\"100%\">&nbsp;</td></tr>\n\t</tr>\n</table>\n";
    } else {
        // If no user is in edition, draw a tool for adding an admin
        $add_a_user = drawNewAdminForm();
        return skin($conf_skin, $add_a_user, _("Add a virtual administrator"));
    }
}
Exemple #19
0
/js/common/plugins/jquery.dialog.js?self=true&ver=20140815"></script>
<script type="text/javascript">
try{
	document.domain = '<?php 
echo base_url();
?>
';
}catch(e){
	//console.log(e);
}
</script>

<script type="text/javascript">
var WDURL = "";
var SCHEME= "<?php 
echo skin();
?>
";
var icon_url = "<?php 
echo skin_url();
?>
/css/base/dialog/icons/";                       
var settings_customer_manage = "<?php 
echo site_url('settings/customer_manage');
?>
";    
var basedata_customer = "<?php 
echo site_url('basedata/customer');
?>
";                  
var settings_vendor_manage = "<?php 
Exemple #20
0
<?php

echo $topbar;
?>
<div class="clear"></div>
<?php 
echo $menu;
?>

<div id="content">
	<?php 
echo form_open('settings/save');
echo '<div>' . form_label(lang('settings.name'), 'form_name') . ': ';
echo form_input($name) . '</div>';
echo '<div>' . form_label(lang('settings.pass'), 'form_pass') . ': ';
echo form_password($pass) . '</div>';
echo '<div>' . form_label(lang('settings.passconf'), 'form_passconf') . ': ';
echo form_password($pass_conf) . '</div>';
echo '<div>' . form_label(lang('settings.email'), 'form_email') . ': ';
echo form_input($email) . '</div>';
echo '<div>' . form_label(lang('settings.skin'), 'form_skin') . ': ';
echo form_dropdown('skin', $skins, skin()) . '</div>';
echo '<div>' . form_label(lang('settings.hibernate'), 'form_hibernate') . ': ';
echo form_checkbox($hibernating) . '</div>';
echo '<div>' . form_submit('submit', lang('settings.submit')) . '</div>';
echo form_close();
?>
</div>

<?php 
echo $license;