예제 #1
0
 /**
  * Function that processes the callback from the bank and returns CPayment objects with isSuccessful
  * (and other applicable) parameters filled according to the answers from the bank.
  *
  * @return CPayment
  */
 public function HandleCallback()
 {
     $rsField = array();
     foreach ((array) $_REQUEST as $ixField => $fieldValue) {
         $rsField[$ixField] = $fieldValue;
     }
     $sSignatureBase = sprintf("%03s", $rsField['ver']) . sprintf("%-10s", $rsField['id']) . sprintf("%012s", $rsField['ecuno']) . sprintf("%06s", $rsField['receipt_no']) . sprintf("%012s", $rsField['eamount']) . sprintf("%3s", $rsField['cur']) . $rsField['respcode'] . $rsField['datetime'] . sprintf("%-40s", $rsField['msgdata']) . sprintf("%-40s", $rsField['actiontext']);
     function hex2str($hex)
     {
         for ($i = 0; $i < strlen($hex); $i += 2) {
             $str .= chr(hexdec(substr($hex, $i, 2)));
         }
         return $str;
     }
     $mac = hex2str($rsField['mac']);
     $sSignature = sha1($sSignatureBase);
     $flKey = openssl_get_publickey(file_get_contents($this->flBankCertificate));
     if (!openssl_verify($sSignatureBase, $mac, $flKey)) {
         trigger_error("Invalid signature", E_USER_ERROR);
     }
     if ($rsField['receipt_no'] == 00) {
         return new CPayment($rsField['ecuno'], $rsField['msgdata'], null, null, False);
     } else {
         return new CPayment($rsField['ecuno'], $rsField['msgdata'], $rsField['eamount'] / 100, $rsField['cur'], True);
     }
 }
예제 #2
0
파일: Estcard.php 프로젝트: Silxik/banklink
 public function isSuccesful()
 {
     foreach ((array) $_REQUEST as $ixField => $fieldValue) {
         $this->responseFields[$ixField] = $fieldValue;
     }
     $sSignatureBase = sprintf("%03s", $this->responseFields['ver']) . sprintf("%-10s", $this->responseFields['id']) . sprintf("%012s", $this->responseFields['ecuno']) . sprintf("%06s", $this->responseFields['receipt_no']) . sprintf("%012s", $this->responseFields['eamount']) . sprintf("%3s", $this->responseFields['cur']) . $this->responseFields['respcode'] . $this->responseFields['datetime'] . $this->mb_sprintf("%-40s", $this->responseFields['msgdata']) . $this->mb_sprintf("%-40s", $this->responseFields['actiontext']);
     function hex2str($hex)
     {
         $str = '';
         for ($i = 0; $i < strlen($hex); $i += 2) {
             $str .= chr(hexdec(substr($hex, $i, 2)));
         }
         return $str;
     }
     $mac = hex2str($this->responseFields['mac']);
     $flKey = openssl_get_publickey(\Configuration::where('code', '=', 'estcard/pubkey')->first()->value);
     if (!openssl_verify($sSignatureBase, $mac, $flKey)) {
         // invalidSignature
         return false;
     }
     if ($this->responseFields['receipt_no'] == 00) {
         # Payment was cancelled
         return false;
     }
     if ($this->responseFields['respcode'] == 00) {
         # Payment success
         return true;
     }
 }
예제 #3
0
 function getMessage()
 {
     $message = $this->message;
     $message = hex2str($message);
     $message = wordwrap($message, 70);
     $this->message = $message;
 }
예제 #4
0
function main()
{
    global $VERSION, $key, $iv2;
    $a = $_GET['a'];
    switch ($a) {
        default:
            print '
				<html>
					<head>
						<title>rsdf2txt ' . $VERSION . ' from fox21.at</title>
					</head>
					<body>
						Copy and paste the content of the .rsdf file into this textarea.<br />
						<form action="?a=decrypt" method="post">
							<textarea name="content" rows="10" cols="60"></textarea><br /><br />
							<input type="submit" value="Get" />
						</form>
					</body>
				</head>
			';
            break;
        case 'decrypt':
            $content = $_POST['content'];
            #$content = implode('', file($url));
            $content = hex2str($content);
            $links = explode("\r\n", $content);
            $out = '';
            foreach ($links as $link) {
                if (strlen($link) != 0) {
                    $b64 = base64_decode($link);
                    $dec = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $b64, MCRYPT_MODE_CFB, $iv2);
                    $dec = substr($dec, strpos($dec, '/files/'));
                    if ($dec != '') {
                        $out .= "http://rapidshare.com{$dec}\n";
                    }
                }
            }
            print '
				<html>
					<head>
						<title>rsdf2txt ' . $VERSION . ' from fox21.at</title>
					</head>
					<body>
						<textarea rows="20" cols="70">' . $out . '</textarea>
					</body>
				</head>
			';
            break;
    }
}
예제 #5
0
 /**
  * @param number $factor
  * @return string
  */
 public function color($factor)
 {
     $factor = max(0.0, min(1.0, $factor));
     $color1 = $color2 = $this->gradient['0.0'];
     $f1 = 0;
     foreach ($this->gradient as $f => $color) {
         if ($factor <= $f) {
             $color2 = $color;
             if ($f1 != $f) {
                 $factor = ($factor - $f1) / ($f - $f1);
             } else {
                 $factor = $f;
             }
             break;
         }
         $color1 = $color;
         $f1 = $f;
     }
     return hex2str(interpolate($color1, $color2, $factor));
 }
예제 #6
0
    case 2:
        $gdbo->sql = "delete from _srv_resolution where id_srv_resolution={$rid}";
        $gdbo->dbTable = "_srv_resolution";
        $gdbo->execQuery();
        break;
}
$gdbo->sql = "update _srv set srv_du=current_timestamp where id_srv={$id}";
$gdbo->dbTable = "_srv";
$gdbo->execQuery();
$gdbo->sql = "SELECT\na.id_srv_resolution,\nscript2text(a.srv_resolution) as \"Notes\",\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.srv_resolution_dc)+{$gmtOffset}) as \"srv_resolution_dc\",\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.srv_resolution_du)+{$gmtOffset},'%M %D, %Y') as \"srv_resolution_du\",\nconcat(d.cust_contact_givenName,' ',d.cust_contact_familyName) as \"fullname\",\na.id_sys_user,\na.srv_resolution_privateBit,\n(SELECT concat('<img src=''/_avatar/thumb_',fso,''' height=''32'' width=''32''/>') as fso FROM _fso where fso_pkcol='id_cust_contact' AND fso_pk=b.id_cust_contact AND fso_originalname='avatar') as \"Avatar\"\nFROM\n_srv_resolution a\nLEFT JOIN _sys_user_emp b ON a.id_sys_user=b.id_sys_user\nLEFT JOIN _cust_contact d ON b.id_cust_contact=d.id_cust_contact\nWHERE a.id_srv=" . $id . "\nORDER BY\na.srv_resolution_dc DESC";
$gdbo->getRec();
$aResolution = $gdbo->dbData;
if (count($aResolution) > 0) {
    $debug = 1;
    foreach ($aResolution as $key => $row) {
        $isPrivate = $row[6] == 1 ? " [Private Note]" : "";
        $editRecord = $row[5] == $id_sys_user ? " onclick=\"editRow('resolution'," . $row[0] . ")\"" : "";
        echo "<div class=\"frmrowh\" {$editRecord}>";
        foreach ($row as $col => $value) {
            if ($col == 1) {
                $notes = $row[6] == 1 && $row[5] != $id_sys_user ? encrypt(hex2str($value)) : $value;
                $notes = wordwrap($notes, 128, "\n", true);
                echo "<div class=\"srvDate\" id=\"resolution_head_" . $row[0] . "\">\n<div class=\"flLeft\">" . $row[7] . " Last updated " . $row[3] . " by " . $row[4] . "</div><div class=\"flRight\">{$isPrivate}</div></div>";
                echo "<div class=\"srvData\" id=\"resolution_" . $row[0] . "\">" . $notes . "</div>";
            }
        }
        echo "</div>";
    }
} else {
    echo "";
}
예제 #7
0
function dosendsms($msisdn, $sms_text)
{
    // 短信中心号码
    $smsc = "8613800755500";
    // 短信最大长度70个汉字,Unicode表示需要280个字节
    $max_len = 280;
    $invert_smsc = InvertNumbers($smsc);
    $len = 1;
    $s = chr(13);
    $msisdn = "86" . $msisdn;
    $sms_text = $sms_text;
    $pdu_text = hex2str(gb2unicode($sms_text));
    echo gb2unicode($sms_text) . "\n";
    $invert_msisdn = InvertNumbers($msisdn);
    // 拆分发送超过70汉字的短信(todo: 没有判断全英文的情况)
    $pdu_len = strlen($pdu_text);
    if ($pdu_len > $max_len) {
        $pdu_text1 = substr($pdu_text, 0, $max_len);
        $pdu_text = substr($pdu_text, $max_len, $pdu_len - $max_len);
    } else {
        $pdu_text1 = $pdu_text;
        $pdu_text = "";
    }
    $pdu_len1 = sprintf("%02X", strlen($pdu_text1) / 2);
    $pdu_text1 = $pdu_len1 . $pdu_text1;
    $pdu_text1 = "11000D91" . $invert_msisdn . "000800" . $pdu_text1;
    $atcmd = "AT+CMGS=" . sprintf("%d", strlen($pdu_text1) / 2) . chr(13);
    $l = strlen($atcmd);
    echo $atcmd . "\n";
    /*
    $ll = @dio_write($fd,$atcmd);
    while ($l != $ll) {
    		sleep(10);
    		$ll = @dio_write($fd,$atcmd);
    }
    if ($DEBUG) echo date("Y-m-d H:i:s")." DEBUG $atcmd\n";
    
    do {
    		$data = dio_read($fd, $len);
    		echo $data;
    } while ( $data != $s );
    
    sleep(1);
    */
    $pdu_text1 = "0891" . $invert_smsc . $pdu_text1 . chr(26) . chr(13);
    $l = strlen($pdu_text1);
    echo $pdu_text1 . "\n";
    /*
    $ll = @dio_write($fd,$pdu_text1);
    while ($l != $ll) {
    		sleep(10);
    		$ll = @dio_write($fd,$pdu_text1);
    }
    if ($DEBUG) echo date("Y-m-d H:i:s")." DEBUG $pdu_text1\n";
    
    do {
    		$data = dio_read($fd, $len);
    		echo $data;
    } while ( $data != $s );
       
    sleep(7);
    */
}
예제 #8
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
if (!isset($_POST["id_cfg"])) {
    $_POST["id_cfg"] = "";
}
$device = new ArcTbl();
$device->dbConStr = $globalDBCON;
$device->dbLimit = 10;
$device->dbOffset = 0;
$device->dbType = $globalDBTP;
$device->dbSchema = $globalDB;
$device->recIndex = "id_cfg_device";
$device->recOrder = "asc";
$device->actionDestination = "popWindow";
$device->recOrderCol = "Label";
$device->recLink = $path . "edit_cfgdevice.php";
$device->actionFilterKey = "id_cfg_device";
$device->recQuery = "\nSELECT\na.cfg_device as \"Device Label\",\na.id_cfg_device,\nc.device_grp as \"Type\",\nb.device as \"Device\",\na.cfg_device_os as \"OS\",\nconcat(f.cust_contact_familyName,',',f.cust_contact_givenName) as \"Admin\",\na.cfg_device_serialnumber as \"Serial Number\",\nUNHEX(a.cfg_device_notes) as \"Notes\",\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.cfg_device_dc)+" . $gmtOffset . ",'%Y-%m-%d') as \"Date Entered\",\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.cfg_device_du)+" . $gmtOffset . ") as \"Last Update\",\nd.sys_status as \"Status\",\nCASE\nWHEN a.cfg_device_keyenabled = 1\nTHEN 'Yes'\nELSE 'No'\nEND as \"Manageable\",\na.id_cfg,\nconcat('\n<input type=\"button\" value=\"Interfaces\" onclick=\"arc(''popWindow'',''/_mod/smod_18/manage_interface.php'',''id_cfg=',cast(id_cfg as char),'&id_cfg_device=',cast(a.id_cfg_device as char),'&id_device=',cast(a.id_device as char),''',1,1)\"/>\n<input type=\"button\" value=\"Delete\" onclick=\"delCfgDevice(',cast(id_cfg as char),',',cast(a.id_cfg_device as char),')\"/>\n') as \"\" FROM _cfg_device a\nLEFT JOIN\n_device b ON a.id_device=b.id_device\nLEFT JOIN\n_device_grp c ON b.id_device_grp=c.id_device_grp\nLEFT JOIN\n_sys_status d ON a.id_sys_status=d.id_sys_status\nLEFT JOIN\n_hr_emp e ON a.id_hr_emp = e.id_hr_emp\nLEFT JOIN\n_cust_contact f ON e.id_cust_contact = f.id_cust_contact\nWHERE a.id_cfg=" . $_POST["id_cfg"] . " ORDER by a.cfg_device";
$device->ajDestination = "list18-0";
$device->ajPage = "/_mod/smod_18/list_cfgdevice.php";
$device->recOrder = "asc";
$device->recOrderCol = "Device";
$device->ignoreCols = array("id_cfg", "Notes", "Date Entered", "id_cfg_device");
$device->ignoreFilterCols = array("id_cfg", "id_cfg_device", "");
$device->build();
echo hex2str($device->tblNav);
echo $device->dataTable;
예제 #9
0
function snmp_hexstring($hex)
{
    return hex2str(str_replace(' ', '', str_replace(' 00', '', $hex)));
}
function snmp_hexstring($str)
{
    if (isHexString($str)) {
        return hex2str(str_replace(' ', '', str_replace(' 00', '', $str)));
    } else {
        return $str;
    }
}
예제 #11
0
파일: example.php 프로젝트: rsiva6/WhatsAPI
function parsEmo($matches)
{
    return hex2str($matches[1]);
}
예제 #12
0
function decrypt($str)
{
    $key = $GLOBALS['salt'];
    $str = hex2str($str);
    $str = mcrypt_decrypt(MCRYPT_DES, $key, $str, MCRYPT_MODE_ECB);
    $block = mcrypt_get_block_size('des', 'ecb');
    $pad = ord($str[($len = strlen($str)) - 1]);
    return substr($str, 0, strlen($str) - $pad);
}
예제 #13
0
# Contract Type
require "_model/dboContractTp.php";
$gdbo->getRec();
$listContractTp = $gdbo->dbData;
# Contract Category
require "_model/dboContractCat.php";
$gdbo->getRec();
$listContractCat = $gdbo->dbData;
# Contract Status
require "_model/dboContractStatus.php";
$gdbo->getRec();
$listContractStatus = $gdbo->dbData;
# Fieldset Variables
$buttonDate = '<div class="elementIconBox" onclick="openCalendar(this,\'interface\',null,\'dateFld\')"><i class="fa fa-calendar"></i></div>';
# Fieldsets
$fsContract = array(array(array("*Organization", "id_cust_company", null, 1, $listCompany, $rec[0]["id_cust_company"]), array("*Status", "id_sys_status", null, 1, $listContractStatus, $rec[0]["id_sys_status"]), array(null, "id_contract", null, 3, null, $rec[0]["id_contract"])), array(array("*Type", "id_contract_tp", null, 1, $listContractTp, $rec[0]["id_contract_tp"]), array("*Category", "id_contract_cat", null, 1, $listContractCat, $rec[0]["id_contract_cat"])), array(array("*Contract", "contract", null, 0, null, $rec[0]["contract"]), array("*Label", "contract_label", null, 0, null, $rec[0]["contract_label"])), array(array("*Value", "contract_value", 'onblur="validateElement(\'money\',this)"', 0, null, $rec[0]["contract_value"]), array("Paid to Date", "paid", 'disabled="disabled"', 0, null, $rec[0]["contract_paid"])), array(array('Award Date', 'contract_da', 'class="dateFld elementIcon" onblur="validateElement(\'date\',this)"', 0, null, $rec[0]["contract_da"], null, $buttonDate, null, 'YYYY-MM-DD'), array("Date Updated", "contract_du", 'disabled="disabled"', 0, null, $rec[0]["contract_du"])), array(array('Execution Date', 'contract_ds', 'class="dateFld elementIcon" onblur="validateElement(\'date\',this)"', 0, null, $rec[0]["contract_ds"], null, $buttonDate, null, 'YYYY-MM-DD'), array("Date Terminated", "contract_dr", 'disabled="disabled"', 0, null, $rec[0]["contract_dr"])), array(array('Expiration Date', 'contract_de', 'class="dateFld elementIcon" onblur="validateElement(\'date\',this)"', 0, null, $rec[0]["contract_ds"], null, $buttonDate, null, 'YYYY-MM-DD')), array(array('General Notes', 'contract_notes', 'onkeydown="detectTab(this,event)"', 6, null, hex2str($rec[0]["contract_notes"]))), array(array('Billing Notes', 'contract_billingNotes', 'onkeydown="detectTab(this,event)"', 6, null, hex2str($rec[0]["contract_billingNotes"]))));
$requiredFields = "contract_value,id_cust_company,id_sys_status,contract_label,contract,id_contract_cat,id_contract_tp";
?>
<form method="post" id="frmContract" name="frmContract" action="javascript:submitFrmVals('content','/_mod/smod_08/sql.php','<?php 
echo $requiredFields;
?>
','&form=frmContract&action=update','frmContract')">
<fieldset id="contract_detail">
<legend>Contract Detail</legend>
<?php 
echo frmElements($fsContract);
?>
</fieldset>
</form>
<form action="#">
<fieldset id="Files">
예제 #14
0
 public function sendImage($msgid, $to, $path, $size, $link, $b64thumb)
 {
     $thumb_length = hex2str(_hex(strlen($b64thumb)));
     $to_length = chr(mb_strlen($to, "UTF-8"));
     $msgid_length = chr(mb_strlen($msgid));
     $path_length = chr(mb_strlen($path));
     $size_length = chr(mb_strlen($size));
     // in bytes
     $link_length = chr(strlen($link));
     $content = "ø] úü{$to_length}";
     $content .= $to;
     $content .= "Š¢Cü{$msgid_length}";
     $content .= $msgid;
     $content .= "øøº½OøøŒø\f\\½°¢Düfileü{$path_length}";
     $content .= $path;
     $content .= "üsizeü{$size_length}";
     $content .= $size;
     $content .= "¥ü{$link_length}";
     $content .= $link;
     $content .= "ý{$thumb_length}";
     $content .= $b64thumb;
     $total_length = hex2str(_hex(strlen($content)));
     $msg = "";
     $msg .= "{$total_length}";
     $msg .= $content;
     echo str2hex($msg);
     $stream = $this->send($msg);
     $this->read();
 }
예제 #15
0
$inc = 1;
foreach ($dboData as $Column => $Data) {
    $comma = $inc != 1 ? "," : "";
    $dbo->{$Column} = $Data;
    $inc = $inc + 1;
}
if (isset($dbo->dependents)) {
    $dependents = json_decode($dbo->dependents);
    foreach ($dependents as $element => $name) {
        echo '<script>$("' . $name . '").prop("disabled",true);</script>';
    }
}
$attributes = isset($dbo->attributes) ? $dbo->attributes : "";
$recID = isset($dbo->id) ? $dbo->id : "";
if (!empty($_POST["VAL"])) {
    $dbo->sql = $dbo->sql . " " . $dbo->dbFilter . hex2str($_POST["VAL"]);
    $dbo->getRec();
    $results = $dbo->dbData;
    $count = $dbo->dbRows;
    $disabled = "";
} else {
    $results = array();
    $disabled = 'disabled="disabled"';
}
if ($count == 0) {
    $disabled = 'disabled="disabled"';
    $first = null;
    $text = null;
} else {
    $first = $results[0][0];
    $text = $results[0][1];
예제 #16
0
    $contactMethods = hex2str($_POST["contact_method_mText"]);
    $contactMethods = json_decode($contactMethods);
    $contactMethodsInsertStr = array2sqlstring($contactMethods, "0,2");
}
if (isset($_POST["degree_mText"])) {
    $degree = hex2str($_POST["degree_mText"]);
    $degree = json_decode($degree);
    $degreeInsertStr = array2sqlstring($degree, "0,1,2,4,5,6");
}
if (isset($_POST["certification_mText"])) {
    $certification = hex2str($_POST["certification_mText"]);
    $certification = json_decode($certification);
    $certificationInsertStr = array2sqlstring($certification, "3,4,5");
}
if (isset($_POST["insurance_mText"])) {
    $insurance = hex2str($_POST["insurance_mText"]);
    $insurance = json_decode($insurance);
    $insuranceInsertStr = array2sqlstring($insurance, "0,2,3,4");
}
# Multi Form Columns
$contactMethodsCols = "contact_method,contact_method_notes,id_contact_method_tp,id_cust_contact";
$degreeCols = "hr_degree_hours,hr_degree,hr_degree_ds,hr_degree_da,id_hr_degree_status,id_hr_degree_level,id_cust_company,id_cust_branch,id_hr_emp";
$certificationCols = "hr_certification_hours,hr_certification_ds,hr_certification_da,id_hr_certification_status,id_hr_certification_provider,id_hr_certification_tp,id_hr_emp";
$insuranceCols = "hr_insurance_ds,hr_insurance_de,id_cust_company,id_hr_insurance_plan,id_hr_insurance_coverage,id_hr_emp";
# Parse Form Action
$action = $_POST['action'];
$form = $_POST['form'];
$formAction = $form . "," . $action;
# Begin SQL Functions
switch ($formAction) {
    case "frmEmp,insert":
예제 #17
0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
$arctbl = json_decode(hex2str($_POST["arctbl"]), TRUE);
$cols = json_decode(hex2str($_POST["arccols"]), TRUE);
foreach ($cols as $key => $col) {
    $coltype[$key] = $col["type"];
    $collabel[$key] = $col["name"];
}
array_multisort($collabel, SORT_ASC, $cols);
$colFullArray = array();
foreach ($cols as $column) {
    $colFullArray[] = array($column["type"], $column["name"]);
}
?>
<div id="popBox">
<form method="POST" id="frmFilter" name="frmFilter" action="javascript:buildLocalFilter('<?php 
echo $arctbl["ajPage"];
?>
','<?php 
예제 #18
0
.syntaxhighlighter table td.code .line {
white-space: pre-wrap !important;
word-wrap: break-word !important;
}
@media screen and (max-width: 680px) {
.syntaxhighlighter .gutter {
display:none;
}
</style>
<?php 
/*
Copyright (C) © 2010-2013 BIFRÖST SOFTWARE LLC
Author: Carlos Omar Villanueva
*/
require "_lib/php/auth.php";
$data = hex2str($_POST["DBO"]);
?>
<html>
<head>
<title></title>
<link href="/_thirdparty/syntaxhighlighter_3.0.83/styles/shThemeDefault.css" rel="stylesheet" type="text/css"/>
<link href="/_thirdparty/syntaxhighlighter_3.0.83/styles/shCoreDefault.css" rel="stylesheet" type="text/css"/>
<script src="/_thirdparty/ckeditor/ckeditor.js" type="text/javascript"></script>
<script src="/_lib/jquery/0-jquery.js" type="text/javascript"></script>
<script src="/_lib/js/ArcJS.js" type="text/javascript"></script>
<script src="/_thirdparty/syntaxhighlighter_3.0.83/scripts/shCore.js" type="text/javascript"></script>
<script src="/_thirdparty/syntaxhighlighter_3.0.83/scripts/shLegacy.js" type="text/javascript"></script>
<script src="/_thirdparty/syntaxhighlighter_3.0.83/scripts/shBrushJScript.js" type="text/javascript"></script>
<script src="/_thirdparty/syntaxhighlighter_3.0.83/scripts/shBrushXml.js" type="text/javascript"></script>
</head><body>
<?php 
예제 #19
0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
if (isset($_POST["uid"])) {
    $uid = hex2str($_POST["uid"]);
    $arrUser = explode(",", $uid);
    # Find existing users
    $gdbo->sql = "SELECT id_sys_user FROM _srv_res WHERE id_srv=" . $_POST["id_srv"];
    $gdbo->getRec();
    $recordset = $gdbo->dbData;
    $existing = array_column($recordset, 0);
    $newusers = array_diff($arrUser, $existing);
    $users = "";
    foreach ($newusers as $key => $value) {
        if ($key != 0) {
            $comma = ",";
        } else {
            $comma = "";
        }
        $users .= $comma . "(" . $_POST["id_srv"] . ",{$value})";
예제 #20
0
    foreach ($_GET as $key => $value) {
        $data_received[$key] = $value;
    }
}
if (count($_POST) > 0) {
    foreach ($_POST as $key => $value) {
        $data_received[$key] = $value;
    }
}
//Treating the whole frame
$frame = $data_received['frame'];
//Parsing:
$frame_type = hexdec(substr($frame, 6, 2));
$data_fields = hexdec(substr($frame, 8, 2));
//Converting all to ASCII
$frame_ascii = hex2str($frame);
//Exploding the frame by #
$array_data = explode('#', $frame_ascii);
$id_secret = $array_data[1];
$id_wasp = $array_data[2];
$frame_number = $array_data[3];
$Sensortype = $id_wasp;
$Sensorname = $id_secret;
//Now, we take all the sensors data: (BAT:89)
for ($index = 0; $index < $data_fields; $index++) {
    $sensor = explode(':', $array_data[$index + 4]);
    if ($debug) {
        print_r($sensor);
        echo '<br>';
    }
    $sensor_ascii = $sensor[0];
예제 #21
0
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
# Includes
require_once "_lib/php/auth.php";
# Parse Contact Methods
if (isset($_POST["contact_method_mText"])) {
    $contactMethods = hex2str($_POST["contact_method_mText"]);
    $contactMethods = json_decode($contactMethods);
    $contactMethodsInsertStr = array2sqlstring($contactMethods, "0,2");
}
# Multi Form Columns
$contactMethodsCols = "contact_method,contact_method_notes,id_contact_method_tp,id_cust_contact";
# Parse Form Action
$action = $_POST['action'];
$form = $_POST['form'];
$formAction = $form . "," . $action;
# Begin SQL Functions
switch ($formAction) {
    case "frmContact,insert":
        /*****************************************************************************/
        # Insert Address Record
        $gdbo->dbTable = "_addr";
예제 #22
0
/**
 * Convert an SNMP index string (without len!) to regular string
 *
 * @param string $index
 * @return string
 */
function snmp_indexstring($index)
{
    if (preg_match('/^[\\d\\.]+$/', $index)) {
        $string = '';
        foreach (explode('.', $index) as $char) {
            if ($char > 255) {
                // break, incorrect index string
                return $index;
            }
            $string .= zeropad(dechex($char));
        }
        return hex2str($string);
    }
    return $index;
}
예제 #23
0
    $arcdb->dbSchema = $globalDB;
    /**************************************************/
    $arcdb->sql = "\nSELECT\na.id_con, \na.con, \na.id_con_db_tp,\na.con_alias,\na.con_user,\na.con_enabledbit,\na.con_password,\na.con_host,\na.con_port,\na.con_catalog,\na.con_options,\nb.con_db_tp\nFROM _con a\nLEFT JOIN _con_db_tp b ON a.id_con_db_tp=b.id_con_db_tp\nWHERE a.id_con =" . $_POST["id_con"];
    $arcdb->getRec();
    $con = $arcdb->getAssociative();
}
$arcCon = new ArcTbl();
$arcCon->dbLimit = 23;
$arcCon->dbOffset = 0;
$arcCon->dbCatalog = isset($con[0]["con_catalog"]) ? $con[0]["con_catalog"] : $arcCon->dbCatalog;
$arcCon->oCon = isset($con[0]["con"]) ? $con[0]["con"] : $arcCon->oCon;
$arcCon->dbTable = $arcCon->oCon;
$arcCon->dbSchema = isset($con[0]["con"]) ? $con[0]["con"] : $arcCon->dbSchema;
$arcCon->oUser = isset($con[0]["con_user"]) ? $con[0]["con_user"] : $arcCon->oUser;
$arcCon->oPassword = isset($con[0]["con_password"]) && !empty($con[0]["con_password"]) ? decrypt($con[0]["con_password"]) : $arcCon->oPassword;
$arcCon->oHost = isset($con[0]["con_host"]) ? $con[0]["con_host"] : $arcCon->oHost;
$arcCon->oPort = isset($con[0]["con_port"]) ? $con[0]["con_port"] : $arcCon->oPort;
$arcCon->oOptions = isset($con[0]["con_options"]) ? $con[0]["con_options"] : $arcCon->oOptions;
$arcCon->dbType = isset($con[0]["con_db_tp"]) ? $con[0]["con_db_tp"] : $arcCon->dbType;
$arcCon->ajDestination = "queryReport";
$arcCon->ajPage = $path . "view_customquery.php";
$arcCon->ignoreCols = array();
$arcCon->ignoreFilterCols = array();
$arcCon->post = isset($_POST["arctbl"]) ? $_POST["arctbl"] : null;
$arcCon->recQuery = $sql;
$arcCon->build();
echo hex2str($arcCon->tblNav);
echo $arcCon->dataTable;
?>
 
예제 #24
0
}
if (isset($_GET) && isset($_GET['type'])) {
    $type = $_GET['type'];
}
if (isset($_GET) && isset($_GET['extension'])) {
    $file_extension = $_GET['extension'];
}
if (isset($_POST) && isset($_POST['password'])) {
    $password = $_POST['password'];
}
$typed_pw = $password;
$results = array('success' => false, 'url' => 'http://blockstrap.com', 'msg' => 'Unable to copy or delete file');
$api = new bs_api();
$tx = $api->transaction(array('chain' => $chain, 'id' => $txid));
if (isset($tx['time']) && isset($tx['outputs']) && isset($tx['outputs'][1]) && isset($tx['outputs'][1]['script_pub_key'])) {
    $pub_key = hex2str($tx['outputs'][1]['script_pub_key']);
    // TODO - WHY IS THIS FLAKEY...?
    $key_array = explode('jI', $pub_key);
    if (!isset($key_array[1])) {
        $key_array = explode('j:', $pub_key);
    }
    if (strpos($pub_key, '{') == 2) {
        $msg = json_decode(substr($pub_key, 2), true);
    } else {
        $msg = json_decode($key_array[1], true);
    }
    $pw = 'false';
    if (isset($msg['p'])) {
        $pw = $msg['p'];
    }
    $hash = $msg['h'];
예제 #25
0
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
printArray($_POST);
filterQryPost("id");
$id = hex2str($id);
filterQryPost("rid");
filterQryPost("val");
filterQryPost("edit");
filterQryPost("pri");
switch ($edit) {
    case 0:
        $gdbo->sql = "insert into _srv_descr (srv_descr_privateBit,id_srv,srv_descr,id_sys_user,srv_descr_du) values ({$pri},{$id},'{$val}',{$id_sys_user},current_timestamp)";
        $gdbo->dbTable = "_srv_descr";
        $gdbo->execQuery();
        break;
    case 1:
        $gdbo->sql = "update _srv_descr set srv_descr_privateBit={$pri},srv_descr_du=current_timestamp,id_srv={$id},srv_descr='{$val}',id_sys_user={$id_sys_user} where id_srv_descr={$rid}";
        $gdbo->dbTable = "_srv_descr";
        $gdbo->execQuery();
        break;
예제 #26
0
$ajCfgDevice = isset($_POST["id_cfg_device"]) ? "&id_cfg_device=" . $_POST["id_cfg_device"] : "";
$ajCfgDevice .= isset($_POST["id_device"]) ? "&id_device=" . $_POST["id_device"] : "";
$ajCfgDevice .= isset($_POST["id_cfg"]) ? "&id_cfg=" . $_POST["id_cfg"] : "";
if (!isset($_POST["id_device"])) {
    $_POST["id_device"] = "";
}
require_once "_lib/php/auth.php";
$gdbo = new ArcTbl();
$gdbo->dbConStr = $globalDBCON;
$gdbo->dbLimit = 25;
$gdbo->dbOffset = 0;
$gdbo->dbType = $globalDBTP;
$gdbo->dbSchema = $globalDB;
#$gdbo->recDetail="hex2str(\$record['Notes'])";
$gdbo->recOrder = "asc";
$gdbo->tblKey = "iflabel";
$gdbo->elements = array(array("Label", "device_interfacelabel"));
$gdbo->recOrderCol = "id_device_interfacelabel";
$gdbo->recQuery = "\nSELECT \nid_device_interfacelabel,\ndevice_interfacelabel as Label,\nid_device\nFROM _device_interfacelabel WHERE id_device=" . $_POST["id_device"];
$gdbo->dbTable = "_device_interfacelabel";
$gdbo->recIndex = $gdbo->getPrimaryKey();
$gdbo->updateAction = '"updateTable(\'rc".$rowIndex."_".$tblKey."\',\'". $this -> dbTable. "\',\'".$this->primaryKey."\',".$rowIndex.",1,\'' . $path . 'sql.php\',\'fs_labels\',\'&form=frmIFLabel&action=edit' . $ajCfgDevice . '\')"';
$gdbo->deleteAction = '"updateTable(\'rc".$rowIndex."_".$tblKey."\',\'". $this -> dbTable. "\',\'".$this->primaryKey."\',".$rowIndex.",2,\'' . $path . 'sql.php\',\'fs_labels\',\'&form=frmIFLabel&action=delete' . $ajCfgDevice . '\')"';
$gdbo->editable = true;
$gdbo->ajDestination = "tbliflabel";
$gdbo->ajPage = "/_mod/smod_18/list_iflabel.php";
$gdbo->ignoreCols = array("id_device", "id_device_interfacelabel");
$gdbo->ignoreFilterCols = array("id_device_interfacelabel", "id_device");
$gdbo->build();
echo hex2str($gdbo->tblNav);
echo $gdbo->dataTable;
예제 #27
0
# Parse Form Action
$action = $_POST['action'];
$form = $_POST['form'];
$formAction = $form . "," . $action;
# Static Variables
$_POST["contract_du"] = $dtTimeUTC;
if (isset($_POST["id_sys_status"]) && $_POST["id_sys_status"] == 14 && isset($_POST["contract_dr"]) && $_POST["contract_dr"] == "") {
    $_POST["contract_dr"] = $dtTimeUTC;
} elseif ($_POST["id_sys_status"] != 14 && isset($_POST["contract_dr"]) && $_POST["contract_dr"] != "") {
    $_POST["contract_dr"] = '';
} else {
    $_POST["contract_dr"] = isset($_POST["contract_dr"]) ? $_POST["contract_dr"] : null;
}
# Parse
if (isset($_POST["payment_mText"])) {
    $payments = hex2str($_POST["payment_mText"]);
    $payments = json_decode($payments);
    $paymentsFormatted = array();
    foreach ($payments as $payment => $entry) {
        $paymentProcessed = !empty($entry[2]) ? strtotime($entry[2]) : NULL;
        $paymentsFormatted[] = array($entry[0], strtotime($entry[1]), $paymentProcessed, $entry[3]);
    }
    $paymentsInsertStr = array2sqlstring($paymentsFormatted, "0,1");
}
# Multi Form Columns
$paymentCols = "contract_payment,contract_payment_dr,contract_payment_dp,id_contract";
switch ($formAction) {
    case "frmContract,insert":
        /*****************************************************************************/
        $gdbo->dbTable = "_contract";
        $gdbo->insertRec();
예제 #28
0
 function build()
 {
     $pgParams = $this->get();
     #echo "<pre>".print_r($pgParams,true)."</pre>";
     if ($this->prep()) {
         $dbType = $this->dbType;
         $oUser = $this->oUser;
         $oPassword = $this->oPassword;
         $oHost = $this->oHost;
         $oPort = $this->oPort;
         $oOptions = $this->oOptions;
         $oCon = $this->oCon;
         $dbLimit = $this->dbLimit;
         $recTotalRows = $this->recTotalRows;
         $tblKey = $pgParams->tblKey;
         $recPage = $pgParams->recPage;
         $previousPage = $recPage - 1;
         $nextPage = $recPage + 1;
         $start = $this->dbOffset + 1;
         $end = $start + $this->dbRows - 1;
         $dbCols = $this->dbCols;
         $ignoreCols = $this->ignoreCols;
         $ignoreFilterCols = $this->ignoreFilterCols;
         $recIndex = $this->recIndex;
         $tableRows = $this->getAssociative();
         $filterableCols = $dbCols;
         for ($i = 0; $i < count($dbCols); $i++) {
             foreach ($ignoreFilterCols as $key => $value) {
                 if ($dbCols[$i]["name"] == $value) {
                     unset($filterableCols[$i]);
                 }
             }
         }
         $tableColumns = array();
         $dbColData = array();
         foreach ($dbCols as $entry) {
             $tableColumns[] = $entry["name"];
             $dbColData[$entry["name"]] = array("type" => $entry["type"]);
         }
         $tableColumnsFiltered = array_diff($tableColumns, $ignoreCols);
         if ($recTotalRows <= $dbLimit) {
             $numPages = 1;
         } else {
             if ($recTotalRows % $dbLimit == 0) {
                 $numPages = $recTotalRows / $dbLimit;
             } else {
                 $numPages = (int) ($recTotalRows / $dbLimit) + 1;
             }
         }
         $firstLink = isset($previousPage) && $previousPage > 1 ? $this->buildNav('<i class="fa fa-angle-double-left"></i>First', 1) : "";
         $lastLink = $prevLink = isset($previousPage) && $previousPage > 0 ? $this->buildNav('<i class="fa fa-angle-left"></i>Previous', $previousPage) : "";
         $nextLink = isset($nextPage) && $nextPage <= $numPages ? $this->buildNav('<i class="fa fa-angle-right"></i>Next', $nextPage) : "";
         $lastLink = isset($nextPage) && $nextPage <= $numPages ? $this->buildNav('<i class="fa fa-angle-double-right"></i>Last', $numPages) : "";
         $refreshLink = $this->buildNav('<i class="fa fa-refresh" style="margin:0"></i>', 1, 'clTblRefresh');
         if (isset($this->dbCatlog) && $this->dbCatalog != null) {
             $exportCatalog = ",'" . encrypt($this->dbType) . "'";
         } else {
             $exportCatalog = "";
         }
         $dbo = encrypt(json_encode((array) $this));
         $exportLink = '<a class="button" onclick="qry2csv(\'' . $dbo . '\' )"><i class="fa fa-download fa-fw"></i>Export</a>';
         $pageSummary = "<strong>Page</strong> " . $recPage . " of " . $numPages;
         $recordRange = "<strong>Record</strong> " . $start . " thru " . $end;
         $recordSummary = $recordRange . " | <strong>Total</strong> " . $recTotalRows;
         $filterLink = '<a class="button" onclick="arc(\'popWindowFilter\',\'/_lib/php/ArcDbFilter.php\',\'arccols=' . bin2hex(json_encode($filterableCols)) . '&arctbl=' . bin2hex(json_encode($pgParams)) . '\',1,1)"><i class="fa fa-filter fa-fw"></i>Advanced Filter</a>';
         $this->tblNav = bin2hex("\n<div id=\"" . $this->tblID . "_controlBar\" class=\"headingRow\">\n<div class=\"headingLeft\">" . $recordSummary . " | " . $pageSummary . "</div>\n<div class=\"headingRight\">" . $firstLink . $prevLink . $nextLink . $lastLink . $exportLink . $filterLink . $refreshLink . "</div>\n</div>");
         $pagingDebugValues = (object) array("recPage" => $recPage, "first" => $firstLink, "previous" => $previousPage, "nextPage" => $nextPage, "prevPage" => $previousPage, "last" => $lastLink, "numPages" => $numPages, "recTotalRows" => $recTotalRows);
         if ($this->debug === TRUE) {
             printArray($pagingDebugValues);
         }
         $dataTable = "<table class=\"dataGrid\" id=\"" . $this->tblID . "\"><tr><th>&nbsp;</th>";
         $order = $pgParams->recOrder;
         switch ($this->dbType) {
             case "mysql":
                 $strBox = array("`", "`");
                 break;
             case "mssql":
                 $strBox = array("[", "]");
                 break;
             case "pgsql":
                 $strBox = array("\"", "\"");
                 break;
         }
         $orderCol = $pgParams->recOrderCol;
         if ($this->debug === TRUE) {
             printArray($pgParams);
         }
         foreach ($tableColumnsFiltered as $record => $col) {
             if (strtolower($col) == 'action' | $col == '') {
                 $actioncol = 'class="colaction"';
                 $actioncolid = $record;
             } else {
                 $actioncol = '';
                 $actioncolid = null;
             }
             if ($orderCol == $strBox[0] . $col . $strBox[1]) {
                 if ($order == "asc") {
                     $pgParams->recPage = 1;
                     $pgParams->recOrder = "desc";
                     $sortString = '<i class="fa fa-sort-alpha-asc"></i>';
                 } else {
                     $pgParams->recPage = 1;
                     $pgParams->recOrder = "asc";
                     $sortString = '<i class="fa fa-sort-alpha-desc"></i>';
                 }
             } else {
                 $pgParams->recOrder = "asc";
                 $sortString = '<i class="fa fa-sort"></i>';
             }
             $pgParams->recOrderCol = $strBox[0] . $col . $strBox[1];
             $thtext = $col == $this->primaryKey ? '<i class="fa fa-key"></i> ' . $col : $col;
             $thdata = $actioncol == '' ? "onclick=\"arc('" . $pgParams->ajDestination . "','" . $pgParams->ajPage . "','arctbl=" . bin2hex(json_encode($pgParams)) . "',1,1)\"><div style='float:left'>" . $thtext . "</div><div style='float:right;padding-right:4px'> " . $sortString . "</div>" : ">";
             $dataTable .= "<th " . $actioncol . $thdata . "</th>";
         }
         if ($this->editable === true) {
             $dataTable .= "<th>&nbsp;</th>";
         }
         $dataTable .= "</tr>";
         foreach ($tableRows as $record) {
             $rowIndex = isset($recIndex) ? $record[$recIndex] : $start;
             if (!is_null($pgParams->recDetail)) {
                 $detailStr = $pgParams->recDetail;
                 eval("\$detail=" . $detailStr . ";");
                 $action = ' onClick="$(\'#rd' . $rowIndex . '_' . $this->tblKey . '\').toggle()"';
             } elseif (!is_null($pgParams->recLink)) {
                 $detail = "&nbsp;";
                 $action = " onClick=\"arc('" . $pgParams->actionDestination . "','" . $pgParams->recLink . "','" . $pgParams->actionFilterKey . "=" . $record[$recIndex] . "'){$pgParams->moreActions}\"";
             } else {
                 $detail = "&nbsp;";
                 $action = "";
             }
             $rowClass = $start % 2 == 0 ? "class=\"evenRow\"" : "class=\"oddRow\"";
             $dataTable .= "<tr {$rowClass} id=\"rc" . $rowIndex . "_" . $tblKey . "\">";
             $dataTable .= "<td class=\"rowID\">" . $start . "</td>";
             if ($this->editable === true) {
                 foreach ($tableColumnsFiltered as $col => $value) {
                     if ($this->elements != null) {
                         $key = multiArraySearch($this->elements, $tableColumnsFiltered[$col]);
                         $recColumn = $key !== false ? $this->elements[$key][1] : $tableColumnsFiltered[$col];
                     } else {
                         $recColumn = $tableColumnsFiltered[$col];
                     }
                     $dbColType = $dbColData[$tableColumnsFiltered[$col]]["type"];
                     $addAction = $col != $actioncolid ? $action : "";
                     $disabled = $tableColumnsFiltered[$col] == $this->primaryKey ? 'disabled=="disabed"' : '';
                     $colData = $dbColType == "text" || $dbColType == "blob" ? hex2str($record[$value]) : $record[$value];
                     switch ($dbColType) {
                         case "string":
                         case "varchar":
                         case "char":
                         case "date":
                         case "datetime":
                         case "timestamp":
                         case "time":
                             $dataTable .= "<td " . $addAction . "><input {$disabled} onblur=\"isDefault(this)\" type=\"text\" name=\"" . $recColumn . "\" value=\"" . $colData . "\"/></td>";
                             break;
                         case "int":
                         case "bigint":
                         case "numeric":
                         case "decimal":
                             $dataTable .= "<td " . $addAction . "><input {$disabled} onblur=\"isDefault(this)\" type=\"text\" name=\"" . $recColumn . "\" value=\"" . $colData . "\"/></td>";
                             break;
                         case "text":
                         case "blob":
                             $dataTable .= "<td " . $addAction . "><textarea {$disabled} onblur=\"isDefault(this)\" type=\"text\" name=\"" . $recColumn . "\">" . str_replace(">", "&gt;", str_replace("<", "&lt;", $colData)) . "</textarea></td>";
                             break;
                         default:
                             $dataTable .= "<td>Not Supported.</td>";
                             break;
                     }
                 }
             } else {
                 foreach ($tableColumnsFiltered as $col => $value) {
                     $addAction = $col != $actioncolid ? $action : "";
                     $dataTable .= "<td " . $addAction . ">" . $record[$value] . "</td>";
                 }
             }
             if ($this->editable === true) {
                 if ($this->deleteAction === null) {
                     $deleteAction = "updateRow('rc" . $rowIndex . "_" . $tblKey . "','" . $this->dbTable . "','" . $this->primaryKey . "'," . $rowIndex . ",2,'" . $this->control . "','" . $this->ajDestination . "','" . $this->actionDestination . "')";
                 } else {
                     eval("\$deleteAction = " . $this->deleteAction . ";");
                 }
                 if ($this->updateAction === null) {
                     $updateAction = "updateRow('rc" . $rowIndex . "_" . $tblKey . "','" . $this->dbTable . "','" . $this->primaryKey . "'," . $rowIndex . ",1,'" . $this->control . "','" . $this->ajDestination . "','" . $this->actionDestination . "')";
                 } else {
                     eval("\$updateAction = " . $this->updateAction . ";");
                 }
                 $dataTable .= "<td><input type=\"button\" value=\"Update\" onclick=\"" . $updateAction . "\"/><input type=\"button\" value=\"Delete\" onclick=\"" . $deleteAction . "\"/></td>";
             }
             $dataTable .= "</tr>";
             $colCount = count($tableColumnsFiltered) + 1;
             $dataTable .= "<tr class=\"rdetail\" id=\"rd" . $rowIndex . "_" . $tblKey . "\" style=\"display:none\"><td colspan=\"" . $colCount . "\" >" . $detail . "</td></tr>";
             $start = $start + 1;
         }
         $dataTable .= "</table>";
         $this->dataTable = $dataTable;
     }
 }
예제 #29
0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
$arctbl = new ArcTbl();
$arctbl->dbConStr = $globalDBCON;
$arctbl->dbOffset = 0;
$arctbl->dbLimit = 23;
$arctbl->dbType = $globalDBTP;
$arctbl->dbSchema = $globalDB;
$arctbl->recLink = $path . "edit.php";
$arctbl->actionFilterKey = "id_cust_department";
$arctbl->recIndex = "id_cust_department";
$arctbl->ignoreCols = array("id_cust_department");
$arctbl->recQuery = "\nSELECT\na.id_cust_department,\na.cust_department as \"Department\",\nc.cust_branch_tp as \"Type\",\nb.cust_branch as \"Branch\"\nFROM _cust_department a\nJOIN _cust_branch b ON a.id_cust_branch=b.id_cust_branch\nJOIN _cust_branch_tp c ON b.id_cust_branch_tp=c.id_cust_branch_tp";
$arctbl->actionDestination = "content";
$arctbl->ajDestination = "list03";
$arctbl->ajPage = $path . "list.php";
$arctbl->build();
echo hex2str($arctbl->tblNav);
echo $arctbl->dataTable;
예제 #30
0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
filterQryPost("period");
$period = hex2str($period);
$periodArray = explode(".", $period);
$periodStart = $periodArray[1];
$periodEnd = $periodArray[2];
/*************************************/
/* application variables */
/*************************************/
$curYear = date('Y', strtotime($dtTimeCurrent));
$curDay = date('j', strtotime($dtTimeCurrent));
$curMonth = date('n', strtotime($dtTimeCurrent));
$yearID = isset($yearID) ? $yearID : $curYear;
$monthID = isset($monthID) ? $monthID : $curMonth;
$firstDayofMonth = date("l", mktime(0, 0, 0, $monthID, 1, $yearID));
$dayCount = cal_days_in_month(CAL_GREGORIAN, $monthID, $yearID);
$todayTime = strtotime("{$yearID}-{$monthID}-{$curDay} 00:00:00 ");
/************************************************************************/