本文整理汇总了PHP中Trace::output方法的典型用法代码示例。如果您正苦于以下问题:PHP Trace::output方法的具体用法?PHP Trace::output怎么用?PHP Trace::output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Trace
的用法示例。
在下文中一共展示了Trace::output方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveImg
public function saveImg()
{
Trace::output($this->traceID, "saveImg");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$chk = array("bool" => 1);
//----------------------------------------------------------
$img = str_replace('data:image/png;base64,', '', $this->img);
$img = str_replace(' ', '+', $img);
$data = base64_decode($img);
$date = new DateTime();
//----------------------------------------------------------
if (is_null($imgName) || $encrypt) {
$imgName = alphaID($date->getTimestamp()) . ".png";
}
//----------------------------------------------------------
if (file_exists($this->dir)) {
FileFolder::file_put_contents($this->dir . $imgName, $data);
$chk["result"] = $this->fullURL . $imgName;
} else {
$chk['bool'] = false;
$chk['message'] = $this->fullURL . " does no exist!!";
}
//----------------------------------------------------------
return $chk;
}
示例2: getData
public static function getData($file)
{
Trace::output(self::$traceID, "getData");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$chk = array("bool" => true, 'traceID' => "getData");
//----------------------------------------------------------
$swfheader = new swfheader($file);
$file_swf = new File_SWF($file);
//----------------------------------------------------------
if ($file_swf->is_valid()) {
$stat = $file_swf->stat();
$fileSize = $stat['fileSize'][0];
$swfheader->size = $fileSize;
$chk['result'] = $swfheader;
} else {
$chk['bool'] = false;
$chk['error'] = true;
$chk['message'] = "swf was no valid";
}
//----------------------------------------------------------
$chk['output'] = Trace::$output;
//----------------------------------------------------------
return $chk;
}
示例3: _insertContents
function _insertContents($dirArray, $close = FALSE)
{
Trace::output($this->traceID, "_insertContents");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$i;
$queryString = "";
$chk = array("bool" => true, 'function' => "_insertContents");
//----------------------------------------------------------
//INSERT INTO tbl_name (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9);
for ($i = 0; $i < sizeof($dirArray); $i++) {
$queryString .= 'CALL insertVideo("' . $dirArray[$i]['path'] . '","' . $dirArray[$i]['title'] . '","' . $dirArray[$i]['hash'] . '","' . $dirArray[$i]['mp4'] . '","' . $dirArray[$i]['thumbnail_url'] . '"); ';
}
print_r($queryString);
//----------------------------------------------------------
//$chk = MySQL::getResult($queryString);
//----------------------------------------------------------
return $chk;
}
示例4: sendLink
public function sendLink($email, $message, $url)
{
Trace::output($this->traceID, "sendLink");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$chk = array("bool" => true, "traceID" => "sendLink");
//----------------------------------------------------------
$chk = GenFun::error_CHK($obj);
//----------------------------------------------------------
$emailObj = array("emailTo" => $email, 'link' => "http://awwthentic.com/Modules/DOM/uber_src/server/werm/services/Download.php?url={$url}", 'linkTxt' => "Click here to download file.", "message" => $message, "subject" => $subject = $obj['sender'] . " sent you a file!!!");
//----------------------------------------------------------
if ($chk['bool']) {
$chk = SendEmail_v0::sendDefault($emailObj);
} else {
return $chk;
}
//----------------------------------------------------------
if ($chk['bool']) {
$chk['message'] = "Email was successfully sent to {$email}";
}
//----------------------------------------------------------
return $chk;
}
示例5: error_CHK
public static function error_CHK($valueArr, $traceID = NULL)
{
Trace::output(self::$traceID, "error_CHK");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$chk = $traceID != NULL ? array("bool" => true, "func" => $traceID . ": error_CHK") : array("bool" => true, "func" => ": error_CHK");
//----------------------------------------------------------
$keys = array_keys($valueArr);
//----------------------------------------------------------
foreach ($valueArr as $i => $value) {
$valueArr[$i] = GenFun::varCHK($valueArr[$i]);
if ($valueArr[$i] == NULL || !isset($valueArr[$i]) || empty($valueArr[$i])) {
$chk = array_merge($chk, array("bool" => false, "error" => true, "message" => "'" . $i . "' is NULL or is'nt set"));
break;
}
}
//----------------------------------------------------------
$chk["valueArr"] = $valueArr;
//----------------------------------------------------------
$chk["output"] = Trace::$output;
//----------------------------------------------------------
return $chk;
}
示例6: updateAssets
private function updateAssets($id, $returnRow = true)
{
Trace::output($this->traceID, "updateAssets");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$chk = array("bool" => true, 'traceID' => "updateAssets");
$insertID = GlobalMas::$mysqli->insert_id;
//----------------------------------------------------------
$chk = Update::go(Projects_const::TBL, array(Projects_const::CLM_ASSETS_ID => $insertID), array("id" => $id));
//----------------------------------------------------------
if ($returnRow) {
$chk = MySQL::getTable(Assets_const::TBL, array(Assets_const::CLM_ID => $insertID));
}
//----------------------------------------------------------
return $chk;
}
示例7: _insertContents
private function _insertContents($dirArray, $close = FALSE)
{
Trace::output($this->traceID, "_insertContents");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$i;
$queryString = "";
$chk = array("bool" => true, 'function' => "_insertContents");
//----------------------------------------------------------
for ($i = 0; $i < sizeof($dirArray); $i++) {
$queryString .= 'CALL insertVideo("' . $dirArray[$i]['title'] . '","' . $dirArray[$i]['hash'] . '","' . $dirArray[$i]['mp4'] . '","' . $dirArray[$i]['thumbnail_url'] . '"); ';
}
//----------------------------------------------------------
$chk = Result::go($queryString);
krumo($chk);
//----------------------------------------------------------
return Constants::$mysqli->escape_string($queryString);
}
示例8: emailForgotLink
public function emailForgotLink($linkHash)
{
Trace::output($this->traceID, "emailForgotLink");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$chk = array("bool" => true, "traceID" => "emailForgotLink");
$emailObj;
//----------------------------------------------------------
$smarty = Smarty::getSmarty();
$smarty->assign('forgot_url', Account_v0::$forgot_url);
$smarty->assign('linkHash', $linkHash);
$message = $smarty->fetch('forgot.tpl');
//----------------------------------------------------------
$emailObj = array("emailTo" => $this->email, "nameFrom" => Constants::$name, "emailFrom" => Constants::$email, "message" => $message, "subject" => "account registration");
//----------------------------------------------------------
$chk = $chk["bool"] ? SendEmail_v0::go($emailObj) : $chk;
//----------------------------------------------------------
return $chk;
}
示例9: sendConfirmation
private function sendConfirmation($email, $categoryID, $linkHash, $type)
{
Trace::output($this->traceID, "sendConfirmation");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$chk = array("bool" => true, "traceID" => "sendConfirmation");
$emailObj;
$typeofs = $type == 0 ? 'terminate your subscription' : 'subscribe';
//----------------------------------------------------------
$message = '<div style = "padding:20px; width:500px; background-color:#999999; height:160px;font-family: arial; font-size:12px; color: #FFFFFF;">';
$message .= 'This message was sent with the intention of verifiying your request to ' . $typeofs . ' to the following list: <br><br>';
$message .= '<b>"' . strtoupper($this->categoryName) . '"</b><br><br> To confirm, please click the link below: <br><br>';
$message .= '<a href = "http://awwthentic.com/Modules/DOM/examples/form/form_v2/confirmation.php?hash=' . $linkHash . '">click here to complete process</a></div>';
$message = GenFun::html($message);
$emailObj = array("emailTo" => $email, "nameFrom" => GlobalMas::NAME, "emailFrom" => GlobalMas::EMAIL, "message" => $message, "subject" => "mailinglist registration");
//----------------------------------------------------------
$chk = $chk["bool"] ? SendEmail_v0::go($emailObj) : $chk;
//----------------------------------------------------------
if ($chk["bool"]) {
return $chk;
}
}
示例10: _send
private function _send()
{
Trace::output($this->traceID, "_send");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$headers = "";
$chk = array("bool" => true, "func" => $this->traceID . ": _send");
//----------------------------------------------------------
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
//----------------------------------------------------------
if ($this->nameFrom != NULL && $this->emailFrom != NULL) {
$headers .= 'From: ' . $this->nameFrom . ' <' . $this->emailFrom . '>' . "\r\n";
}
//----------------------------------------------------------
if (!is_null($this->ccArr)) {
$headers .= "Cc: " . join(",", $this->ccArr);
}
//----------------------------------------------------------
$chk["bool"] = mail($this->emailTo, $this->subject, $this->message, $headers) ? true : false;
//----------------------------------------------------------
$chk["message"] = $chk["bool"] ? "Your email has been sent" : "Your email did not go through";
//----------------------------------------------------------
if (GlobalMas::$debug) {
$chk['output'] = Trace::$output;
}
//----------------------------------------------------------
if (GlobalMas::$debug) {
$chk['resultHistory'] = Result::$resultHistory;
}
//----------------------------------------------------------
return $chk;
}
示例11: getImages
public function getImages($returnType = "XML")
{
Trace::output($this->traceID, "getImages");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$chk = array("bool" => true, 'traceID' => "getImages");
//----------------------------------------------------------
$chk = MySQL::getTable(NicKelmanConst_v0::TBL_IMAGES);
//----------------------------------------------------------
if ($returnType == "XML") {
if ($chk['bool']) {
$chk = GenFun::json_to_xml(json_encode(array("item" => $chk['result'])), true);
}
}
//----------------------------------------------------------
return $chk;
}
示例12: caca
public function caca()
{
Trace::output($this->traceID, "caca");
}
示例13: traceFunction
private static function traceFunction($id, $string, $type)
{
if (Trace::$html && is_null(Trace::$output)) {
Trace::$output = "</br>";
}
Trace::$html ? $string = $type == "log" ? Trace::createString("Success = " . $id . ": " . $string) : Trace::createSpecialString("Success = " + $id . ": " . $string, $type) : ($string = "Success = " . $id . ": " . $string);
//-------------------------------------------------------------------------------------
Trace::$output .= Trace::$html ? $string . "</br>" : $string . "||||";
}
示例14: _updateMessages
private function _updateMessages($updateArr, $approve, $close = FALSE)
{
Trace::output($this->traceID, "_updateMessages");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$i;
$queryString = "";
$chk = array("bool" => true, 'function' => "updateMessages");
//----------------------------------------------------------
$queryString .= "UPDATE " . GuestbookConst_v0::TBL_MESSAGES . " ";
$queryString .= "SET " . GuestbookConst_v0::CLM_APPROVED . " = " . $approve . " ";
$queryString .= "WHERE " . GuestbookConst_v0::CLM_ID . " IN (";
//----------------------------------------------------------
for ($i = 0; $i < sizeof($updateArr); $i++) {
if ($i == 0) {
$queryString .= $updateArr[$i]["id"];
} else {
$queryString .= ",";
$queryString .= $updateArr[$i]["id"];
}
}
//----------------------------------------------------------
$queryString .= ")";
//----------------------------------------------------------
$result = GlobalMas::$mysqli->query($queryString);
//----------------------------------------------------------
$chk['query'] = $queryString;
//----------------------------------------------------------
if (sizeof($result) < 0) {
$chk["bool"] = false;
$chk["result"] = "queryString did not go through";
} else {
$chk["bool"] = true;
$chk["result"] = "rows have been updated";
}
$chk["approve"] = $approve;
//----------------------------------------------------------
if ($close) {
GlobalMas::$mysqli->close($this->conn);
}
//----------------------------------------------------------
$chk['output'] = Trace::$output;
//----------------------------------------------------------
return $chk;
}
示例15: tblConfirm_CHK
private function tblConfirm_CHK($row)
{
Trace::output($this->traceID, "tblConfirm_CHK");
if ($row['confirmed'] == 1) {
$chk['bool'] = true;
$chk['type'] = 1;
$chk['message'] = "Subscription has already been confirmed";
} else {
if ($row['confirmed'] == 0) {
$chk['bool'] = false;
$chk['message'] = "Subscription is not confirmed";
}
}
//----------------------------------------------------------
Trace::output($this->traceID, "tblConfirm_CHK: " . $chk['message']);
//----------------------------------------------------------
return $chk;
}