Пример #1
0
<?php

$s_html = "";
$s_task = lib_set_var("task", "");
$i_overlayID = intval(lib_set_var("overlayID", "0"));
$i_julianDate = intval(lib_set_var("julian", "0"));
$s_input = lib_set_var("input", "");
$server = "65.175.107.2:3306";
$username = "******";
$password = "******";
$dbname = "cms";
$sqlconnect = mysql_connect($server, $username, $password);
$sqldb = mysql_select_db($dbname, $sqlconnect);
switch ($s_task) {
    case "save":
        $s_sql = "update cms.dyn_julian_dates set event = '{$s_input}' where overlayID = {$i_overlayID} and julianDate = {$i_julianDate}";
        $s_html = $s_sql;
        mysql_query($s_sql, $sqlconnect);
        $i_result = mysql_affected_rows($sqlconnect);
        if ($i_result == 0) {
            $s_sql = "insert into cms.dyn_julian_dates (overlayID, julianDate, event) select {$i_overlayID}, {$i_julianDate}, '{$s_input}'";
            $s_html .= "\n" . $s_sql;
            mysql_query($s_sql, $sqlconnect);
        }
        mysql_close($sqlconnect);
        break;
    case "scroll":
        //$s_output = "";
        //$s_date = 	lib_set_var("date","01/01/1900");
        //$s_sql = "select T.due_date, T.name, T.notes, T.task_id, A.first_name, A.last_name, O.org_name, L.street, L.city, L.state, L.zip
        //from nightly_update.dbo.crm_task_table_copy T
Пример #2
0
<?php

$s_html = "";
$i_itemID = intval(lib_set_var("itemID", "0"));
$s_task = lib_set_var("task", "");
$s_purpose = lib_set_var("purpose", "");
$s_shipName = lib_set_var("shipName", "");
$s_slot = lib_set_var("slot", "");
$s_module = lib_set_var("module", "");
$b_command = lib_set_var("command", 0);
$s_filename = basename(__FILE__);
$s_pageName = "Ship Fitting";
$server = "65.175.107.2:3306";
$username = "******";
$password = "******";
$dbname = "braddoro";
$o_conn = mysql_connect($server, $username, $password);
if (!$o_conn) {
    die_well(__LINE__, mysql_error());
}
$o_sel = mysql_select_db($dbname);
if (!$o_sel) {
    die_well(__LINE__, mysql_error());
}
switch ($s_task) {
    case "edit":
        $s_sql = "select fitID, purpose, shipName, slot, module from braddoro.dyn_ship_fitting2 where fitID = {$i_itemID}";
        $q_data = mysql_query($s_sql);
        if (!$q_data) {
            die_well(__LINE__, mysql_error());
        }
Пример #3
0
        $s_html = $objAdmin->blueprintOutput($s_sql);
        break;
    case "blueprintOutput":
        $s_sql = "select B.blueprintID, O.owner, B.blueprintName, B.mat_lev, B.prod_lev, B.bpc, B.copies, B.runs, B.eveID, B.location, M.description  \r\n\tfrom braddoro.dyn_blueprints B \r\n\tleft join braddoro.dyn_blueprint_owners O on B.ownerID = O.ownerID\r\n\tleft join braddoro.invtypes T on B.eveID = T.typeID\r\n\tleft join braddoro.invmarketgroups M on T.marketGroupID = M.marketGroupID\r\n\torder by B.blueprintName;";
        $s_html = $objAdmin->blueprintOutput($s_sql);
        break;
    case "blueprintSave":
        $eveID = intval(lib_set_var("eveID", "0"));
        $mat_lev = intval(lib_set_var("mat_lev", "0"));
        $prod_lev = intval(lib_set_var("prod_lev", "0"));
        $blueprintName = lib_set_var("blueprintName", "");
        $bpc = intval(lib_set_var("bpc", "0"));
        $runs = intval(lib_set_var("runs", "0"));
        $copies = intval(lib_set_var("copies", "0"));
        $ownerID = intval(lib_set_var("ownerID", "0"));
        $location = lib_set_var("location", "");
        if ($i_itemID > 0) {
            $s_sql = "update braddoro.dyn_blueprints set mat_lev = {$mat_lev}, prod_lev = {$prod_lev}, blueprintName = rtrim('{$blueprintName}'), bpc = {$bpc}, runs = {$runs}, copies = {$copies}, ownerID = {$ownerID}, updateDate = now(), location = '{$location}', eveID = {$eveID} where blueprintID = {$i_itemID};";
        } else {
            $s_sql = "INSERT INTO braddoro.dyn_blueprints (eveID,mat_lev,prod_lev,blueprintName,bpc,runs,copies,ownerID,updateDate,location) select {$eveID},{$mat_lev},{$prod_lev},rtrim('{$blueprintName}'),{$bpc},{$runs},{$copies},{$ownerID},now(), '{$location}';";
        }
        $s_html = $objAdmin->genSQL($s_sql);
        $s_sql = "update braddoro.dyn_blueprints, braddoro.invtypes set eveID = typeID where (eveID is null or eveID = 0) AND typeName = concat(rtrim(blueprintName),' Blueprint');";
        $s_html = $objAdmin->genSQL($s_sql);
        $s_sql = "select B.blueprintID, O.owner, B.blueprintName, B.mat_lev, B.prod_lev, B.bpc, B.copies, B.runs, B.eveID, B.location, M.description  \r\n\tfrom braddoro.dyn_blueprints B \r\n\tleft join braddoro.dyn_blueprint_owners O on B.ownerID = O.ownerID\r\n\tleft join braddoro.invtypes T on B.eveID = T.typeID\r\n\tleft join braddoro.invmarketgroups M on T.marketGroupID = M.marketGroupID order by B.blueprintName;";
        $s_html = $objAdmin->blueprintOutput($s_sql);
        break;
    case "error":
        $s_html = $s_task;
        break;
}