Ejemplo n.º 1
0
function skin_LayoutAdminPage_Default()
{
    global $rub;
    global $adm_login;
    global $adm_pass;
    global $conf_session_expir_minute;
    global $pro_mysql_config_table;
    global $conf_skin;
    global $top_commands;
    global $adm_random_pass;
    $anotherTopBanner = anotherTopBanner("DTC", "yes");
    ///////////////////////
    // Make All the page //
    ///////////////////////
    switch ($rub) {
        case "crm":
            // CRM TOOL
            $rightFrameCells[] = skin($conf_skin, DTCRMeditClients(), _("Customer's address"));
            if (isset($_REQUEST["id"]) && $_REQUEST["id"] != "" && $_REQUEST["id"] != 0) {
                $rightFrameCells[] = skin($conf_skin, DTCRMclientAdmins(), _("Customer's administrators"));
            }
            $rightFrame = makeVerticalFrame($rightFrameCells);
            $leftFrameCells[] = skin($conf_skin, DTCRMlistClients(), _("Customers list"));
            $leftFrame = makeVerticalFrame($leftFrameCells);
            $zemain_content = anotherLeftFrame($leftFrame, $rightFrame);
            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
            $chooser_menu = drawDTCConfigMenu();
            $leftFrameCells[] = skin($conf_skin, $chooser_menu, "Menu");
            $leftFrame = makeVerticalFrame($leftFrameCells);
            $rightFrameCells[] = skin($conf_skin, drawDTCConfigForm(), _("DTC Configuration"));
            $rightFrame = makeVerticalFrame($rightFrameCells);
            $zemain_content = anotherLeftFrame($leftFrame, $rightFrame);
            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
            // A virtual admin edition
            // We have to call it first, in case it will generate a random pass (edition of an admin with inclusion of user's panel)
            $rightFrameCells[] = userEditForms($adm_login, $adm_pass);
            $rightFrameCells[] = skinConsole();
            $rightFrame = makeVerticalFrame($rightFrameCells);
            // Our list of admins
            // If random password was not set before this, we have to calculate it now!
            if (isset($adm_random_pass)) {
                $rand = $adm_pass;
            } else {
                $rand = getRandomValue();
                $expirationTIME = mktime() + 60 * $conf_session_expir_minute;
                $q = "UPDATE {$pro_mysql_config_table} SET root_admin_random_pass='******', pass_expire='{$expirationTIME}';";
                $r = mysql_query($q) or die("Cannot execute query \"{$q}\" !");
            }
            $leftFrameCells[] = skin($conf_skin, adminList($rand), _("Admins list"));
            // Make the frame
            $leftFrame = makeVerticalFrame($leftFrameCells);
            $zemain_content = anotherLeftFrame($leftFrame, $rightFrame);
            break;
    }
    if (function_exists("skin_Navbar")) {
        $dtc_main_menu = skin_Navbar();
    } else {
        $dtc_main_menu = skin_Navbar_Default();
    }
    $the_page[] = skin($conf_skin, $dtc_main_menu, _("Domain Technologie Control : root admin console"));
    $the_page[] = $zemain_content;
    $pageContent = makeVerticalFrame($the_page);
    $anotherFooter = anotherFooter("Footer content<br><br>");
    if (!isset($anotherHilight)) {
        $anotherHilight = "";
    }
    if (!isset($anotherMenu)) {
        $anotherMenu = "";
    }
    echo anotherPage("admin:", "", $anotherHilight, makePreloads(), $anotherTopBanner, $anotherMenu, $pageContent, $anotherFooter);
}
Ejemplo n.º 2
0
        $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(""));
}
Ejemplo n.º 3
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);