function Entry() { $ruleId = CgiInput("rule_id", ""); if ($ruleId == "") { CgiOutput(__LINE__, ""); } $dao = new Dao(); $delIn = new Dao_DeleteRuleIn(); $delOut = new Dao_DeleteRuleOut(); $delIn->user = LoginGetUser(); $delIn->ruleId = $ruleId; $dao->DeleteRule($delIn, $delOut); CgiOutput($delOut->errorCode, $delOut->errorMessage); }
function Entry() { $inputMail = CgiInput("mail", ""); $inputReturnPage = CgiInput("return_page", ""); if ($inputMail == "") { CgiOutput(__LINE__, "mail cannot be empty"); } if (LoginGetUser() != "") { CgiOutput(__LINE__, "already login"); } $validateKey = LoginGetValidateKey($inputMail); if (SendMail($inputMail, $validateKey, $inputReturnPage)) { CgiOutput(__LINE__, "send mail failed"); } CgiOutput(0, ""); }
function Entry() { $url = CgiInput("url", ""); if ($url == "") { CgiOutput(__LINE__, ""); } $pattern = CgiInput("pattern", ""); if ($pattern == "") { CgiOutput(__LINE__, ""); } $dao = new Dao(); $addIn = new Dao_AddRuleIn(); $addOut = new Dao_AddRuleOut(); $addIn->creator = LoginGetUser(); $addIn->url = $url; $addIn->pattern = $pattern; $dao->AddRule($addIn, $addOut); CgiOutput($addOut->errorCode, $addOut->errorMessage); }
<?php require_once dirname(__FILE__) . '/' . 'CgiCommon.php'; require_once dirname(__FILE__) . '/' . '../../libs/rlib/Cgi.php'; require_once dirname(__FILE__) . '/' . 'Dao.php'; $input = new AppointmentDaoCreateSubIssueInput(); $output = new AppointmentDaoCreateSubIssueOutput(); $input->issueId = CgiInput("issue_id", ""); $input->name = CgiInput("name", ""); $input->desc = CgiInput("desc", ""); $input->fields = CgiInput("fields", "[]"); $input->max = CgiInput("max", ""); if ($input->name == "") { CgiOutput(__LINE__, "标题不能为空"); } $dao = new AppointmentDao(); $error = $dao->CreateSubIssue($input, $output); CgiOutput($error, $output->errorMessage);
<?php require_once dirname(__FILE__) . '/' . 'CgiCommon.php'; require_once dirname(__FILE__) . '/' . '../../libs/rlib/Cgi.php'; require_once dirname(__FILE__) . '/' . 'Dao.php'; $input = new AppointmentDaoCreateIssueInput(); $output = new AppointmentDaoCreateIssueOutput(); $input->name = CgiInput("name", ""); $input->desc = CgiInput("desc", ""); $input->creator = CgiInput("creator", ""); if ($input->name == "") { CgiOutput(__LINE__, "标题不能为空"); } $dao = new AppointmentDao(); $error = $dao->CreateIssue($input, $output); CgiOutput($error, $output->errorMessage);
#!/usr/bin/php <?php set_include_path(get_include_path() . PATH_SEPARATOR . "/usr/local/mgr5/include/php"); define('__MODULE__', "qiwipullresult"); require_once 'bill_util.php'; echo "Content-Type: text/xml\n\n"; $param = CgiInput(true); $status = $param["status"]; $error = $param["error"]; $amount = $param["amount"]; $iso = $param["ccy"]; $command = $param["command"]; $out_xml = simplexml_load_string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<result/>\n"); $x_api_signature = $_SERVER["HTTP_X_API_SIGNATURE"]; $authorization = $_SERVER["HTTP_AUTHORIZATION"]; $authorization_array = explode(' ', $authorization); $authorization = $authorization_array[1]; Debug("x_api_signature: " . $x_api_signature); Debug("authorization: " . $authorization); if ($x_api_signature == "") { $out_xml->addChild("result_code", "151"); $out_xml->addChild("description", "empty signature"); } elseif ($authorization == "") { $out_xml->addChild("result_code", "150"); $out_xml->addChild("description", "empty authorization"); } elseif ($param["bill_id"] == "") { $out_xml->addChild("result_code", "5"); $out_xml->addChild("description", "empty elid"); } else { $info = LocalQuery("payment.info", array("elid" => $param["elid"])); if ($authorization != base64_encode($info->payment[0]->paymethod[1]->PRV_ID . ":" . $info->payment[0]->paymethod[1]->NOTIFY_PASSWORD)) {
<?php require_once dirname(__FILE__) . '/' . 'CgiCommon.php'; require_once dirname(__FILE__) . '/' . '../../libs/rlib/Cgi.php'; require_once dirname(__FILE__) . '/' . 'Dao.php'; $input = new AppointmentDaoGetIssuesInput(); $output = new AppointmentDaoGetIssuesOutput(); $input->issueId = CgiInput("issue_id", ""); $dao = new AppointmentDao(); $error = $dao->GetIssues($input, $output); $data = array(); $data["issues"] = $output->issues; CgiOutput($error, $output->errorMessage, $data);
<?php require_once dirname(__FILE__) . '/' . 'CgiCommon.php'; require_once dirname(__FILE__) . '/' . '../../libs/rlib/Cgi.php'; require_once dirname(__FILE__) . '/' . 'Dao.php'; require_once dirname(__FILE__) . '/' . '../common/Dao.php'; require_once dirname(__FILE__) . '/' . 'PHPMailerSendFromQqConfig.php'; $input = new AppointmentDaoCreateRequestInput(); $output = new AppointmentDaoCreateRequestOutput(); $input->issueId = CgiInput("issue_id", ""); $input->subIssueId = CgiInput("sub_issue_id", ""); $input->mail = CgiInput("mail", ""); $input->fields = CgiInput("fields", ""); $input->validateKey = rand(1, 999999); if ($input->mail == "") { CgiOutput(__LINE__, "邮箱不能为空"); } // 发送确认邮件 $commonDao = new CommonDao(); $mailUserName = ""; $mailPassword = ""; $localhost = ""; $commonDao->GetConfig("mail.user_name", $mailUserName); $commonDao->GetConfig("mail.password", $mailPassword); $commonDao->GetConfig("localhost", $localhost); $mail = new PHPMailer(); PHPMailerSendFromQqConfig($mail, $mailUserName, $mailPassword); //Set who the message is to be sent to $mail->addAddress($input->mail, $input->mail); //Set the subject line $mail->Subject = '报名/预约确认';
#!/usr/bin/php <?php set_include_path(get_include_path() . PATH_SEPARATOR . "/usr/local/mgr5/include/php"); define('__MODULE__', "qiwipullpayment"); require_once 'bill_util.php'; echo "Content-Type: text/html\n\n"; $client_ip = ClientIp(); $param = CgiInput(); if ($param["auth"] == "") { throw new Error("no auth info"); } else { $info = LocalQuery("payment.info", array("elid" => $param["elid"])); $elid = (string) $info->payment[0]->id; echo "<html>\n"; echo "<head>\n"; echo "\t<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />\n"; echo "\t<link rel='shortcut icon' href='billmgr.ico' type='image/x-icon' />\n"; echo "\t<script language='JavaScript'>\n"; echo "\t\tfunction DoSubmit() {\n"; echo "\t\t\tdocument.qiwiform.submit();\n"; echo "\t\t}\n"; echo "\t</script>\n"; echo "</head>\n"; echo "<body onload='DoSubmit()'>\n"; echo "\t<form name='qiwiform' action='https://qiwi.com/order/external/main.action' method='post'>\n"; echo "\t\t<input type='hidden' name='shop' value='" . (string) $info->payment[0]->paymethod[1]->PRV_ID . "'>\n"; echo "\t\t<input type='hidden' name='transaction' value='" . $elid . "'>\n"; echo "\t\t<input type='hidden' name='successUrl' value='" . (string) $info->payment[0]->manager_url . "?func=payment.success&elid=" . $elid . "&module=" . __MODULE__ . "'>\n"; echo "\t\t<input type='hidden' name='failUrl' value='" . (string) $info->payment[0]->manager_url . "?func=payment.fail&elid=" . $elid . "&module=" . __MODULE__ . "'>\n"; echo "\t</form>\n"; echo "</body>\n";
<?php require_once dirname(__FILE__) . '/' . 'CgiCommon.php'; require_once dirname(__FILE__) . '/' . 'Dao.php'; require_once dirname(__FILE__) . '/' . '../../libs/rlib/Cgi.php'; $input = new AppointmentDaoValidateInput(); $output = new AppointmentDaoValidateOutput(); $input->issueId = CgiInput("issue_id", ""); $input->subIssueId = CgiInput("sub_issue_id", ""); $input->mail = CgiInput("mail", ""); $input->validateKey = CgiInput("validate_key", ""); $dao = new AppointmentDao(); $error = $dao->Validate($input, $output); CgiOutput($error, $output->errorMessage);