本文整理汇总了PHP中General::addLogAction方法的典型用法代码示例。如果您正苦于以下问题:PHP General::addLogAction方法的具体用法?PHP General::addLogAction怎么用?PHP General::addLogAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类General
的用法示例。
在下文中一共展示了General::addLogAction方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tax
exit;
} else {
$pattern = '/^[0-9]+(?:\\.[0-9]{0,2})?$/';
if (preg_match($pattern, trim($_REQUEST['taxper'])) == '0') {
$_SESSION['msg'] = 'Please enter valid tax (%).';
$num = 'danger';
$url = ADMIN_URL . "/packages/add.php";
$general->redirectUrl($url, $num);
exit;
}
}
$servicedata = implode(',', $_REQUEST['serviceapplicable']);
$fieldvalues = array('name' => $_REQUEST['packagename'], 'cost' => $_REQUEST['cost'], 'creditprovided' => $_REQUEST['creditprovided'], 'serviceapplicable' => $servicedata, "servicediscount" => $_REQUEST['servicediscount'], "productdiscount" => $_REQUEST['productdiscount'], "taxname" => $_REQUEST['taxname'], "taxpercent" => $_REQUEST['taxper'], "is_deleted" => '0', "date_added" => date('Y-m-d H:i:s'));
$updated = $Package->addPackage($fieldvalues);
if ($updated) {
$general->addLogAction($_SESSION['adm_user_id'], 'Added', $updated, 'Package Management', $_SESSION['adm_status']);
$error = 'success';
$_SESSION['msg'] = 'Record added successfully.';
} else {
$error = 'danger';
$_SESSION['msg'] = 'Error adding record.';
}
$url = ADMIN_URL . "/packages/index.php";
$general->redirectUrl($url, $error);
exit;
}
/*********************************************************************************************************/
if ($_REQUEST['FLAG'] == 'EDIT_PACKAGE') {
if (trim($_REQUEST['packagename']) == "") {
$_SESSION['msg'] = 'Please enter package name';
$num = 'danger';
示例2:
$mail->Password = SMPT_PASS;
// SMTP account password
$mail->SetFrom(SMPT_EMAIL, 'H-Kore');
$mail->AddReplyTo(SMPT_EMAIL, 'H-Kore');
$mail->Subject = "Set password link";
//this is used to intialte subject of the mail
$msg = "Hello " . $_REQUEST['name'] . "<br/><br/>";
$msg .= "Set password link : <a href='" . SITE_URL . "setpwd.php?token=" . $token . "'>Set Password</a><br/><br/>";
$mail->MsgHTML($msg);
$mail->AddAddress($_REQUEST['emailaddress']);
if (!$mail->Send()) {
$mail->ErrorInfo;
}
$mail->ClearAddresses();
if ($updated) {
$general->addLogAction($_SESSION['adm_user_id'], 'Added', $updated, 'Customer Management', $_SESSION['adm_status']);
$error = 'success';
$_SESSION['msg'] = 'Record added successfully.';
} else {
$error = 'danger';
$_SESSION['msg'] = 'Error adding record.';
}
$url = ADMIN_URL . "/customers/index.php";
$general->redirectUrl($url, $error);
exit;
}
/*********************************************************************************************************/
if ($_REQUEST['FLAG'] == 'EDIT_CUSTOMER') {
if (trim($_REQUEST['name']) == "") {
$_SESSION['msg'] = 'Please enter name.';
$num = 'danger';
示例3: array
$url = ADMIN_URL . "/salesorders/add.php";
$general->redirectUrl($url, $num);
exit;
}
$fieldvalues = array('voucherno' => $_REQUEST['voucherno'], 'productid' => $_REQUEST['product'], 'productquantity' => -$_REQUEST['productqty'], "name" => $_REQUEST['name'], "emailaddress" => $_REQUEST['emailaddress'], "contactno" => $_REQUEST['contactno'], "voucherdate" => $_REQUEST['voucherdate'], 'vouchertype' => $_REQUEST['vouchertype'], "remark" => $_REQUEST['remark'], "date_added" => date('Y-m-d H:i:s'));
$updated = $Salesorder->addSalesorder($fieldvalues);
if ($updated) {
$rows = $Salesorder->getProductById($_REQUEST['product']);
$curr_stock = $rows->current_stock;
$new_stock = $curr_stock - $_REQUEST['productqty'];
$fieldvalues1 = array('current_stock' => $new_stock);
$cond = array('id' => $_REQUEST['product']);
$Salesorder->updateProduct($fieldvalues1, $cond);
}
if ($updated) {
$general->addLogAction($_SESSION['adm_user_id'], 'Added', $updated, 'Purchase orders', $_SESSION['adm_status']);
$error = 'success';
$_SESSION['msg'] = 'Record added successfully.';
} else {
$error = 'danger';
$_SESSION['msg'] = 'Error adding record.';
}
$url = ADMIN_URL . "/salesorders/index.php";
$general->redirectUrl($url, $error);
exit;
}
/*********************************************************************************************************/
if ($_REQUEST['FLAG'] == 'EDIT_SALES') {
if (trim($_REQUEST['name']) == "") {
$_SESSION['msg'] = 'Please enter seller / purchaser name';
$num = 'danger';
示例4: ResizeImage
$_SESSION['msg'] = 'Please select assign service';
$num = 'danger';
$url = ADMIN_URL . "/staff/add.php";
$general->redirectUrl($url, $num);
exit;
}
if ($_REQUEST['stafflevel'][0] == "") {
$_SESSION['msg'] = 'Please select staff level';
$num = 'danger';
$url = ADMIN_URL . "/staff/add.php";
$general->redirectUrl($url, $num);
exit;
}
$resizeImage = new ResizeImage();
if ($Staff->addStaffmember($resizeImage, TEMP_STORAGE, UPLOAD_PATH . STAFF_LARGE_IMG, STAFF_WIDTH, STAFF_HEIGHT, UPLOAD_PATH . STAFF_THUMB_IMG, STAFF_IMG_THUMB_WIDTH, STAFF_IMG_THUMB_HEIGHT, $_REQUEST)) {
$general->addLogAction($_SESSION['adm_user_id'], 'Added', $_REQUEST, 'Staff Management', $_SESSION['adm_status']);
$error = 'success';
$_SESSION['msg'] = 'Record saved successfully.';
} else {
$error = 'danger';
$_SESSION['msg'] = 'Error in saving record.';
}
$url = ADMIN_URL . "/staff/index.php";
$general->redirectUrl($url, $error);
exit;
}
/*********************************************************************************************************/
if ($_REQUEST['FLAG'] == 'EDIT_STAFF') {
if (trim($_REQUEST['name']) == "") {
$_SESSION['msg'] = 'Please enter name';
$num = 'danger';