当前位置: 首页>>代码示例>>PHP>>正文


PHP Core::setSuccessMsg方法代码示例

本文整理汇总了PHP中Core::setSuccessMsg方法的典型用法代码示例。如果您正苦于以下问题:PHP Core::setSuccessMsg方法的具体用法?PHP Core::setSuccessMsg怎么用?PHP Core::setSuccessMsg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Core的用法示例。


在下文中一共展示了Core::setSuccessMsg方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: updateSubscriberList

 function updateSubscriberList($argArrPost)
 {
     $objCore = new Core();
     $varID = implode('\',\'', $argArrPost['frmSubscriberID']);
     $varWhere = "pkSubscriberID IN('" . $varID . "')";
     $this->delete(TABLE_SUBSCRIBERS, $varWhere);
     //***end here
     $objCore->setSuccessMsg(ADMIN_SUBSCRIBER_DELETE);
     return true;
 }
开发者ID:saurabhs4,项目名称:demoshop,代码行数:10,代码来源:class.subscriber.php

示例2: saveClientExtras

 function saveClientExtras($argArrPost)
 {
     $objCore = new Core();
     $clientExtra1 = $argArrPost['ClientExtra1'];
     $clientExtra2 = $argArrPost['ClientExtra2'];
     if ($argArrPost['client_id'] != '') {
         $varWhere = 'pkClientID = ' . $argArrPost['client_id'];
         $arrclm = array('ClientExtra1' => $clientExtra1, 'ClientExtra2' => $clientExtra2);
         $varExtraID = $this->update(TABLE_CLIENTS, $arrclm, $varWhere);
         $objCore->setSuccessMsg("Extra settings updated successfully");
         return 2;
     }
 }
开发者ID:saurabhs4,项目名称:niches,代码行数:13,代码来源:class.extra.php

示例3: ProductDeleteFromWishlist

 function ProductDeleteFromWishlist($argProductID)
 {
     $objCore = new Core();
     $arrWishlistDetails = array();
     $arrNewWishlist = array();
     if (isset($_SESSION['sessWishlistDetails'])) {
         $arrWishlistDetails = $_SESSION['sessWishlistDetails'];
     }
     foreach ($arrWishlistDetails as $arrTempWishlistData) {
         $varPrdId = $arrTempWishlistData['ProductId'];
         if ($varPrdId != $argProductID) {
             array_push($arrNewWishlist, $arrTempWishlistData);
         }
     }
     $_SESSION['msg'] = '';
     $_SESSION['msg'] = 'Product(s) have been deleted successfully from your wishlist.';
     $objCore->setSuccessMsg($_SESSION['msg']);
     unset($_SESSION['sessWishlistDetails']);
     $_SESSION['sessWishlistDetails'] = $arrNewWishlist;
 }
开发者ID:saurabhs4,项目名称:demoshop,代码行数:20,代码来源:class.wishlist.php

示例4: updateUserList

 function updateUserList($argArrPost)
 {
     $objCore = new Core();
     if ($argArrPost['frmChangeAction1'] == 'Delete' || $argArrPost['frmChangeAction2'] == 'Delete') {
         foreach ($argArrPost['user_ids'] as $varNewsID) {
             $varWhr = "pkClientID = " . $varNewsID;
             $this->delete(TABLE_CLIENTS, $varWhr);
             $nichVarWhr = "fkClientID = " . $varNewsID;
             $this->delete(TABLE_NICHES, $nichVarWhr);
             $this->delete(TABLE_NICHE_LOCATIONS, $nichVarWhr);
             $urnsVarWhr = "fkClientID = " . $varNewsID;
             $this->delete(TABLE_URNS, $urnsVarWhr);
         }
         $objCore->setSuccessMsg("Client is successfully deleted");
         return 1;
     }
     if ($argArrPost['frmChangeAction1'] == 'Freezed' || $argArrPost['frmChangeAction2'] == 'Freezed') {
         foreach ($argArrPost['user_ids'] as $varNewsID) {
             $varWhr = "pkClientID = " . $varNewsID;
             $arrCln = array('ClientApprovalStatus' => 'freeze');
             $this->update(TABLE_CLIENTS, $arrCln, $varWhr);
         }
         $objCore->setSuccessMsg("Client Approval status is changed");
         return 2;
     }
     if ($argArrPost['frmChangeAction1'] == 'Approved' || $argArrPost['frmChangeAction2'] == 'Approved') {
         foreach ($argArrPost['user_ids'] as $varNewsID) {
             $varWhr = "pkClientID = '" . $varNewsID . "'";
             $arrCln = array('ClientApprovalStatus' => 'approve');
             $this->update(TABLE_CLIENTS, $arrCln, $varWhr);
         }
         $objCore->setSuccessMsg("Client Approval status is changed ");
         return 4;
     }
 }
开发者ID:saurabhs4,项目名称:niches,代码行数:35,代码来源:class.client9nov.php

示例5: validateForgotPassword

  <div id="middlepart">

<!--  Login Box -->
   <div id="login">
<!-- ERROR DIV -->
    <div class="error" style="display:none;">
        <span>Invalid UserName!</span>
        <p> you have entered wrong UserName</p>
    </div>
<!-- ERROR DIV -->		
<table width="550" align="center">
<thead>
<?php 
if ($objCore->displaySessMsg() != '') {
    echo $objCore->displaySessMsg();
    $objCore->setSuccessMsg('');
    $objCore->setErrorMsg('');
}
?>
<tr><th colspan="2">
Client Forgot Password
</th>
</tr></thead>
<tr><td>
<!-- LOGIN FORM -->
	<form action="forgot_password_action.php" method="post" id="frm_forgot_pass" onsubmit="return validateForgotPassword('frm_forgot_pass');">
		<fieldset>
			<label><span style="color:#FF0000;">*</span> Login ID:</label>
			<input type="text" id="frmUserName" name="frmUserName" tabindex="1" class="input" value="<?php 
echo $varUserName;
?>
开发者ID:saurabhs4,项目名称:niches,代码行数:31,代码来源:forgot_password.php

示例6: changePaging

 function changePaging($argArrPOST)
 {
     //print_r($argArrPOST);die;
     $objCore = new Core();
     $varWhr = 'pkClientID=' . $argArrPOST['ClientID'];
     $arrColumns = array('ClientRecordLimit' => $argArrPOST['frmRecordLimit']);
     $_SESSION['sessClientPagingLimit'] = '';
     $_SESSION['sessClientPagingLimit'] = $argArrPOST['frmRecordLimit'];
     $this->update(TABLE_CLIENTS, $arrColumns, $varWhr);
     $objCore->setSuccessMsg("Page limit record is updated");
     return true;
 }
开发者ID:saurabhs4,项目名称:niches,代码行数:12,代码来源:class.clients_login.php

示例7: updateShippingDetails

 function updateShippingDetails($argArrPOST)
 {
     //print_r($argArrPOST);die;
     $objCore = new Core();
     $objValid = new Validate_fields('');
     $objGeneral = new General();
     @extract($argArrPOST);
     //echo '<pre>';
     $objValid->check_4html = true;
     //Check card details
     /*$objValid->add_text_field('Card Number', strip_tags($argArrPOST['frmCustomerCardNumber']), 'number', 'y', 200);
     		$objValid->add_text_field('Card Type', strip_tags($argArrPOST['frmCustomerCardType']), 'text', 'y',100);
     	    $objValid->add_text_field('Card Expiry Year', strip_tags($argArrPOST['frmCardExpiryYear']), 'text', 'y', 30);
     		$objValid->add_text_field('Card Expiry Month', strip_tags($argArrPOST['frmCardExpiryMonth']), 'text', 'y', 30);
     		$objValid->add_text_field('Card Owner Name', strip_tags($argArrPOST['frmCustomerCardName']), 'text', 'y',100);
     		$objValid->add_text_field('Card Security Code', strip_tags($argArrPOST['frmCustomerCardSecCode']), 'number', 'y',100);*/
     $objValid->add_text_field('Billing Country', strip_tags(trim($argArrPOST['frmCustomerCountry'])), 'text', 'y');
     $objValid->add_text_field('Billing State', strip_tags(trim($argArrPOST['frmCustomerState'])), 'text', 'y');
     $objValid->add_text_field('Billing City', strip_tags(trim($argArrPOST['frmCustomerCity'])), 'text', 'y');
     $objValid->add_text_field('Billing Street Address 1', strip_tags(trim($argArrPOST['frmCustomerAddressOne'])), 'text', 'y');
     $objValid->add_text_field('Billing Zip Code', strip_tags(trim($argArrPOST['frmCustomerZipcode'])), 'text', 'y');
     //shipping address validation
     if ($objValid->validation()) {
         //$errorMsgFirst = 'Please enter required fields!';
     } else {
         $errorMsg = $objValid->create_msg();
     }
     if ($errorMsg) {
         $_SESSION['sessEditAccountDetails'] = $_POST;
         $objCore->setErrorMsg($errorMsg);
         return false;
     } else {
         //Server Side Error Msg for Billing ZipCode
         if ($argArrPOST['frmUserZipCode'] == '0') {
             $_SESSION['sessEditAccountDetails'] = $_POST;
             $errorMsg = 'Invalid Billing ZipCode';
             $objCore->setErrorMsg($errorMsg);
             return false;
         }
         //Server Side Error Msg Shipping ZipCode
         if ($argArrPOST['frmUserShippingZipCode'] == '0') {
             $_SESSION['sessEditAccountDetails'] = $_POST;
             $errorMsg = 'Invalid Shipping ZipCode';
             $objCore->setErrorMsg($errorMsg);
             return false;
         }
         //if no value in UserPhone field
         if ($frmAccountcheck == 'Yes') {
             //echo 'if';die;
             $arrClm = array('CustomerCity' => $argArrPOST['frmCustomerCity'], 'CustomerState' => $argArrPOST['frmCustomerState'], 'CustomerCountry' => $argArrPOST['frmCustomerCountry'], 'CustomerAddressOne' => $argArrPOST['frmCustomerAddressOne'], 'CustomerAddressTwo' => $argArrPOST['frmCustomerAddressTwo'], 'CustomerZipCode' => $argArrPOST['frmCustomerZipcode'], 'CustomerPhone' => $frmCustomerPhone, 'CustomerShippingCity' => $frmCustomerCity, 'CustomerShippingState' => $frmCustomerState, 'CustomerShippingCountry' => $frmCustomerCountry, 'CustomerShippingAddressOne' => $frmCustomerAddressOne, 'CustomerShippingAddressTwo' => $frmCustomerAddressTwo, 'CustomerShippingZipCode' => $frmCustomerZipcode, 'CustomerShippingPhone' => $frmCustomerPhone, 'CustomerIsAddressSame' => 'Yes', 'CustomerDateModified' => 'now()');
         } else {
             //echo 'else';die;
             $arrClm = array('CustomerCity' => $argArrPOST['frmCustomerCity'], 'CustomerState' => $argArrPOST['frmCustomerState'], 'CustomerCountry' => $argArrPOST['frmCustomerCountry'], 'CustomerAddressOne' => $argArrPOST['frmCustomerAddressOne'], 'CustomerAddressTwo' => $argArrPOST['frmCustomerAddressTwo'], 'CustomerZipcode' => $argArrPOST['frmCustomerZipcode'], 'CustomerPhone' => $argArrPOST['frmCustomerPhone'], 'CustomerShippingCity' => $argArrPOST['frmCustomerShippingCity'], 'CustomerShippingState' => $argArrPOST['frmCustomerShippingState'], 'CustomerShippingCountry' => $argArrPOST['frmCustomerShippingCountry'], 'CustomerShippingAddressOne' => $argArrPOST['frmCustomerShippingAddressOne'], 'CustomerShippingAddressTwo' => $argArrPOST['frmCustomerShippingAddressTwo'], 'CustomerShippingZipCode' => $argArrPOST['frmCustomerShippingZipcode'], 'CustomerShippingPhone' => $argArrPOST['frmCustomerShippingPhone'], 'CustomerIsAddressSame' => 'No', 'CustomerDateModified' => 'now()');
         }
         $varWhereCond = ' pkCustomerID = \'' . $_SESSION['sessCustomerID'] . '\'';
         $this->update(TABLE_CUSTOMERS, $arrClm, $varWhereCond);
         /*$arrclm = array(
         		'CustomerCardNumber'			        =>	$argArrPOST['frmCustomerCardNumber'], 
         		'CustomerCardType'		                =>	$argArrPOST['frmCustomerCardType'], 
         		'CustomerCardExpiryDate'			    =>	$argArrPOST['frmCardExpiryMonth'].':'.$argArrPOST['frmCardExpiryYear'], 
         		'CustomerCardName'			            =>	$argArrPOST['frmCustomerCardName'], 
         		'CustomerCardSecCode'					=>  $argArrPOST['frmCustomerCardSecCode'],
         		'CustomerCardDateModified'				=>	'now()');
         		$varWhereCond = ' fkCustomerID = \''.$_SESSION['sessCustomerID'].'\'';
         		$this->update(TABLE_CARD_INFO, $arrclm, $varWhereCond);		*/
         $objCore->setSuccessMsg(USER_ACCOUNT_DETAILS_SUCC_MSG);
         return true;
     }
 }
开发者ID:saurabhs4,项目名称:demoshop,代码行数:69,代码来源:class.customer.php

示例8: deleteUrns

 function deleteUrns($urnID)
 {
     $objCore = new Core();
     $varWhr = "pkUrnID = " . $urnID;
     $this->delete(TABLE_URNS, $varWhr);
     $objCore->setSuccessMsg("Urn is successfully deleted");
     return 1;
 }
开发者ID:saurabhs4,项目名称:niches,代码行数:8,代码来源:class.urns.php

示例9: updateUserList

    function updateUserList($argArrPost)
    {
        $objCore = new Core();
        if ($argArrPost['frmChangeAction1'] == 'Delete' || $argArrPost['frmChangeAction2'] == 'Delete') {
            foreach ($argArrPost['user_ids'] as $varNewsID) {
                $varWhr = "pkClientID = " . $varNewsID;
                $this->delete(TABLE_CLIENTS, $varWhr);
                $nichVarWhr = "fkClientID = " . $varNewsID;
                $this->delete(TABLE_NICHES, $nichVarWhr);
                $this->delete(TABLE_NICHE_LOCATIONS, $nichVarWhr);
                $urnsVarWhr = "fkClientID = " . $varNewsID;
                $this->delete(TABLE_URNS, $urnsVarWhr);
            }
            $objCore->setSuccessMsg("Client is successfully deleted");
            return 1;
        }
        if ($argArrPost['frmChangeAction1'] == 'Freezed' || $argArrPost['frmChangeAction2'] == 'Freezed') {
            foreach ($argArrPost['user_ids'] as $varNewsID) {
                $varWhr = "pkClientID = " . $varNewsID;
                $arrCln = array('ClientApprovalStatus' => 'freeze');
                $this->update(TABLE_CLIENTS, $arrCln, $varWhr);
            }
            $objCore->setSuccessMsg("Client Approval status is changed");
            return 2;
        }
        if ($argArrPost['frmChangeAction1'] == 'Approved' || $argArrPost['frmChangeAction2'] == 'Approved') {
            foreach ($argArrPost['user_ids'] as $varNewsID) {
                $varWhr = "pkClientID = '" . $varNewsID . "'";
                $arrCln = array('ClientApprovalStatus' => 'approve');
                $this->update(TABLE_CLIENTS, $arrCln, $varWhr);
                $arrUsersFlds = array('pkClientID', 'ClientLoginID', 'ClientEmailAddress', 'ClientPassword');
                $varUsersWhere = ' 1 AND pkClientID = \'' . $varNewsID . '\'';
                $arrUsersList = $this->select(TABLE_CLIENTS, $arrUsersFlds, $varUsersWhere);
                $subject_client = 'Account Request Approve';
                // message
                $message = '<html>
				<head>
				  <title>Account request approve</title>
					<style>
					body,tr,td{font-size:11px; font-family:arial}
					</style>
				</head>
				<body>
				  <p>Below are the details.</p>
					<table>
						<tr>
						  <td>Login ID : </td>
						  <td>: ' . $arrUsersList['ClientLoginID'] . '</td>
						</tr>
						<tr>
						  <td>Email ID : </td>
						  <td>: ' . $arrUsersList['ClientEmailAddress'] . '</td> 
						</tr>
						<tr>
						  <td>Password : </td>
						  <td>: ' . $arrUsersList['ClientPassword'] . '</td>
						</tr>
						<tr><td >Regards, Urn-Registry.com Team</td></tr>
						<tr><td colspan="2"></td></tr>
				  </table>
				</body>
				</html>';
                // To send HTML mail, the Content-type header must be set
                $headers = 'MIME-Version: 1.0' . "\r\n";
                $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
                // Additional headers
                $headers .= 'From: <' . ADMIN_EMAIL . '>' . "\r\n";
                @mail($arrUsersList['ClientEmailAddress'], $subject_client, $message, $headers);
            }
            $objCore->setSuccessMsg("Client Approval status is changed ");
            return 4;
        }
    }
开发者ID:saurabhs4,项目名称:niches,代码行数:73,代码来源:class.client.php

示例10: AddCategory

 function AddCategory($argArrPostData)
 {
     //print_r($argArrPostData);exit;
     $objCore = new Core();
     $objValid = new Validate_fields('');
     $objGeneral = new General();
     $objValid->check_4html = true;
     $objValid->add_text_field('Category Name', strip_tags(trim($argArrPostData['frmCategoryName'])), 'text', 'y');
     if ($objValid->validation()) {
         $errorMsgFirst = 'Please enter required fields!';
     } else {
         $errorMsg = $objValid->create_msg();
     }
     $arrSelectCol = array('pkCategoryID');
     if ($argArrPostData['frmCategoryID'] == '') {
         $varWhereCategoryName = 'CategoryName =\'' . trim($argArrPostData['frmCategoryName']) . '\'';
     } else {
         if ($argArrPostData['frmCategoryID'] != '') {
             $varWhereCategoryName = 'CategoryName =\'' . trim($argArrPostData['frmCategoryName']) . '\' AND pkCategoryID !=\'' . $argArrPostData['frmCategoryID'] . '\'';
         }
     }
     $arrCategoryID = $this->select(TABLE_CATEGORIES, $arrSelectCol, $varWhereCategoryName);
     if ($arrCategoryID) {
         $errorMsg .= ERR_CATEGORY_NAME_EXISTS;
     }
     if ($errorMsg) {
         //print_r($_POST);
         $_SESSION['sessCategory'] = $_POST;
         $objCore->setErrorMsg($errorMsg);
         return false;
     } else {
         if ($argArrPostData['frmCategoryID'] != '') {
             $arrCol = array('CategoryName' => $argArrPostData['frmCategoryName'], 'CategoryDateModified' => 'now()');
             $varWhere = '1 AND pkCategoryID = \'' . $argArrPostData['frmCategoryID'] . '\'';
             $this->update(TABLE_CATEGORIES, $arrCol, $varWhere);
             $varMsg = SUCC_CATEGORY_UPDATED;
         } else {
             $arrCol = array('CategoryName' => $argArrPostData['frmCategoryName'], 'CategoryDateAdded' => 'now()');
             $varResult = $this->insert(TABLE_CATEGORIES, $arrCol);
         }
         $objCore->setSuccessMsg($varMsg);
         $objCore->standardRedirect($_SESSION['sessCategoryRedirectURL']);
     }
 }
开发者ID:saurabhs4,项目名称:demoshop,代码行数:44,代码来源:class.category.php

示例11: saveFeedback

 function saveFeedback($argArrPOST)
 {
     $objTemplate = new EmailTemplate();
     $objValid = new Validate_fields();
     $objCore = new Core();
     $objGeneral = new General();
     $objValid->check_4html = true;
     $varUserUserName = $argArrPOST['frmEmail'];
     $varUserFirstName = $argArrPOST['frmName'];
     $varUserSubject = $argArrPOST['frmSubject'];
     $varMessage = $argArrPOST['frmMessage'];
     $objValid->add_text_field('Email', strip_tags($argArrPOST['frmEmail']), 'email', 'y', 255);
     $objValid->add_text_field('Name', strip_tags($argArrPOST['frmName']), 'text', 'y', 100);
     $objValid->add_text_field('Subject', strip_tags($argArrPOST['frmSubject']), 'text', 'y', 255);
     $objValid->add_text_field('Message', strip_tags($argArrPOST['frmMessage']), 'text', 'y');
     if ($objValid->validation()) {
         $errorMsgFirst = 'Please enter required fields!';
     } else {
         $errorMsg = $objValid->create_msg();
     }
     if ($errorMsg) {
         $objCore->setErrorMsg($errorMsg);
         return false;
     } else {
         $objAdminLogin = new AdminLogin();
         $varWhere = '';
         $arrAdminResult = $objAdminLogin->getAdminInfo($varWhere);
         $varAdminEmail = $arrAdminResult['0']['AdminEmail'];
         $varPath = "<img src = " . SITE_ROOT_URL . 'common/images/logo.jpg' . ">";
         $varFromUser = SITE_NAME . '<' . $varAdminEmail . '>';
         $varSiteName = SITE_NAME;
         $varWhereTemplate = ' EmailTemplateTitle = binary \'Feedback email to admin\' AND EmailTemplateStatus = \'Active\' ';
         $arrMailTemplate = $objTemplate->getTemplateInfo($varWhereTemplate);
         $varOutput = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateDescription']));
         $varSubject = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateSubject']));
         $varKeyword = array('{IMAGE_PATH}', '{SITE_NAME}', '{USER_FNAME}', '{USER_USERNAME}', '{USER_SUBJECT}', '{USER_MESSAGE}');
         $varKeywordValues = array($varPath, $varSiteName, $varUserFirstName, $varUserUserName, $varUserSubject, $varMessage);
         $varOutPutValues = str_replace($varKeyword, $varKeywordValues, $varOutput);
         $varSubject = str_replace('{SITE_NAME}', $varSiteName, $varSubject);
         //echo $varOutPutValues;echo $varAdminEmail;echo $varFromUser;echo $varSubject;die;
         $objCore->sendMail($varAdminEmail, $varFromUser, $varSubject, $varOutPutValues);
         $arrclm = array('FeedbackName' => $varUserFirstName, 'FeedbackEmail' => $varUserUserName, 'FeedbackSubject' => $varUserSubject, 'FeedbackDesc' => $varMessage, 'FeedbackStatus' => 'Unread', 'FeedbackDate' => 'now()');
         $varFeedbackID = $this->insert(TABLE_FEEDBACK, $arrclm);
         $objCore->setSuccessMsg(ADMIN_FEEDBACK_MSG);
     }
 }
开发者ID:saurabhs4,项目名称:demoshop,代码行数:46,代码来源:class.feedback.php

示例12: updateTaxDiscount

 function updateTaxDiscount($argArrPost)
 {
     $objCore = new Core();
     $objTaxDiscount = new TaxDiscount();
     if ($argArrPost['frmChangeAction'] == 'Delete') {
         foreach ($argArrPost['frmTaxDiscountID'] as $varTaxDiscountID) {
             //check tax or discount exist or not
             $arrTaxDiscountWhere = " fkTaxDiscountID ='" . $varTaxDiscountID . "'";
             $arrColumn = array('pkProductTaxDiscountID');
             $arrTaxExist = $this->select(TABLE_PRODUCT_TAX_DISCOUNTS, $arrColumn, $arrTaxDiscountWhere);
             if ($arrTaxExist == '') {
                 //	DELETE ALL TaxDiscountS FIRST
                 $arrDelTaxDiscountWhere = " pkTaxDiscountID ='" . $varTaxDiscountID . "'";
                 $this->delete(TABLE_TAX_DISCOUNTS, $arrDelTaxDiscountWhere);
             } else {
                 $objCore->setErrorMsg(ADMIN_TAX_DISCOUNT_CANNOT_DELETE);
                 return false;
             }
         }
         // SET SUCCESS DELETE MESSAGE.
         $objCore->setSuccessMsg(ADMIN_TAX_DISCOUNT_DELETE);
         return true;
     }
     if ($argArrPost['frmChangeAction'] == 'Active') {
         foreach ($argArrPost['frmTaxDiscountID'] as $varTaxDiscountID) {
             // CREATE CONDITION FOR DELETE user RECORD.
             $varWhere = "pkTaxDiscountID = '" . $varTaxDiscountID . "'";
             $arrColumn = array('TaxDiscountStatus' => 'Active');
             $this->update(TABLE_TAX_DISCOUNTS, $arrColumn, $varWhere);
         }
         $objCore->setSuccessMsg(ADMIN_TAX_DISCOUNT_ACTIVE_MSG);
         return true;
     } else {
         foreach ($argArrPost['frmTaxDiscountID'] as $varTaxDiscountID) {
             // CREATE CONDITION FOR DELETE user RECORD.
             $varWhere = "pkTaxDiscountID = '" . $varTaxDiscountID . "'";
             $arrColumn = array('TaxDiscountStatus' => 'Inactive');
             $this->update(TABLE_TAX_DISCOUNTS, $arrColumn, $varWhere);
         }
         $objCore->setSuccessMsg(ADMIN_TAX_DISCOUNT_INACTIVE_MSG);
         return true;
     }
 }
开发者ID:saurabhs4,项目名称:demoshop,代码行数:43,代码来源:class.tax_discount.php

示例13: forgotPasswordMail

 function forgotPasswordMail($argArrPOST)
 {
     $objTemplate = new EmailTemplate();
     $objValid = new Validate_fields();
     $objCore = new Core();
     $objGeneral = new General();
     $objValid->check_4html = true;
     $_SESSION['sessForgotValues'] = array();
     $objValid->add_text_field('Username (E-mail) ', strip_tags($argArrPOST['frmUserName']), 'email', 'y', 255);
     $objValid->add_text_field('Verification Code', strip_tags($argArrPOST['frmSecurityCode']), 'text', 'y', 255);
     if ($objValid->validation()) {
         $errorMsgFirst = 'Please enter required fields!';
     } else {
         $errorMsg = $objValid->create_msg();
     }
     if ($errorMsg) {
         $_SESSION['sessForgotValues'] = $argArrPOST;
         $objCore->setErrorMsg($errorMsg);
         return false;
     } else {
         if ($_SESSION['security_code'] == $argArrPOST['frmSecurityCode'] && !empty($_SESSION['security_code'])) {
             $varWhereCond = " AND AdminUserName  ='" . $argArrPOST['frmUserName'] . "'";
             $userRecords = $this->getAdminNumRows($varWhereCond);
             $userInfo = $this->getAdminInfo($varWhereCond);
             //if($userRecords > 0 && $userInfo['0']['AdminForgotPWStatus'] == 'Inactive')
             if ($userRecords > 0) {
                 $varAdminID = $userInfo['0']['pkAdminID'];
                 //memberdata contain member username
                 $varMemberData = trim(strip_tags($argArrPOST['frmUserName']));
                 $varForgotPasswordCode = $objGeneral->getValidRandomKey(TABLE_ADMIN, array('pkAdminID'), 'AdminForgotPWCode', '25');
                 $varForgotPasswordLink = '<a href="' . SITE_ROOT_URL . 'admin/reset_password.php?mid=' . $varAdminID . '&code=' . $varForgotPasswordCode . '">' . SITE_ROOT_URL . 'admin/reset_password.php?mid=' . $varAdminID . '&code=' . $varForgotPasswordCode . '</a>';
                 $arrColumns = array('AdminForgotPWStatus' => 'Active', 'AdminForgotPWCode' => $varForgotPasswordCode);
                 $varWhereCondition = 'pkAdminID = \'' . $varAdminID . '\'';
                 $this->update(TABLE_ADMIN, $arrColumns, $varWhereCondition);
                 $varAdminEmail = $userInfo[0]['AdminEmail'];
                 $varToUser = $varAdminEmail;
                 $varFromUser = SITE_NAME . '<' . $varAdminEmail . '>';
                 $varSiteName = SITE_NAME;
                 $varWhereTemplate = ' EmailTemplateTitle= \'Admin forgot password\' AND EmailTemplateStatus = \'Active\' ';
                 $arrMailTemplate = $objTemplate->getTemplateInfo($varWhereTemplate);
                 $varOutput = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateDescription']));
                 $varSubject = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateSubject']));
                 /********/
                 $varSubject = str_replace('{PROJECT_NAME}', SITE_NAME, html_entity_decode(stripcslashes($arrMailTemplate['0']['EmailTemplateSubject'])));
                 $varKeyword = array('{IMAGE_PATH}', '{MEMBER}', '{PROJECT_NAME}', '{USER_DATA}', '{FORGOT_PWD_LINK}', '{SITE_NAME}');
                 $varKeywordValues = array($varPathImage, 'Admin', SITE_NAME, $varMemberData, $varForgotPasswordLink, SITE_NAME);
                 $varOutPutValues = str_replace($varKeyword, $varKeywordValues, $varOutput);
                 // Calling mail function
                 //echo $varToUser . $varFromUser . $varSubject . $varOutPutValues;die;
                 $objCore->sendMail($varToUser, $varFromUser, $varSubject, $varOutPutValues);
                 $_SESSION['sessForgotValues'] = '';
                 $objCore->setSuccessMsg(ADMIN_FORGOT_PASSWORD_CONFIRM_MSG);
                 return true;
             } else {
                 $_SESSION['sessForgotValues'] = $argArrPOST;
                 $objCore->setErrorMsg(EMAIL_NOT_EXIST_MSG);
                 return true;
             }
         } else {
             $_SESSION['sessForgotValues'] = $argArrPOST;
             $objCore->setErrorMsg(INVALID_SECURITY_CODE_MSG);
             return false;
         }
     }
 }
开发者ID:saurabhs4,项目名称:demoshop,代码行数:65,代码来源:class.adminlogin.php

示例14: ProductDeleteFromCart

 function ProductDeleteFromCart($argProductID)
 {
     $objCore = new Core();
     $arrCartDetails = array();
     $arrNewCart = array();
     if (isset($_SESSION['sessCartDetails'])) {
         $arrCartDetails = $_SESSION['sessCartDetails'];
     }
     foreach ($arrCartDetails as $arrTempCartData) {
         $varPrdId = $arrTempCartData['ProductId'];
         if ($varPrdId != $argProductID) {
             array_push($arrNewCart, $arrTempCartData);
         }
     }
     $_SESSION['msg'] = '';
     $_SESSION['msg'] = 'Product(s) have been deleted successfully from your shopping cart.';
     $objCore->setSuccessMsg($_SESSION['msg']);
     unset($_SESSION['sessCartDetails']);
     $_SESSION['sessCartDetails'] = $arrNewCart;
     $_SESSION['sessTotalQty'] = '';
     $_SESSION['sessSubTotal'] = '';
     $_SESSION['sessTotalWeight'] = '';
     $_SESSION['sessFlag'] = '';
 }
开发者ID:saurabhs4,项目名称:demoshop,代码行数:24,代码来源:class.cart_utilities.php

示例15: changeCustomerPassword

 function changeCustomerPassword($argArrPOST)
 {
     //print_r($argArrPOST);die;
     $objValid = new Validate_fields();
     $objCore = new Core();
     $objValid->check_4html = true;
     //print_r($argArrPOST);die;
     $_SESSION["sessChangeUserPassword"] = array();
     $varOldPassword = $argArrPOST['frmUserOldPassword'];
     $varNewPassword = $argArrPOST['frmUserNewPassword'];
     $varConfirmPassword = $argArrPOST['frmUserConfirmPassword'];
     //*** server side validation will start from here .
     $objValid->add_text_field('Current Password', strip_tags($argArrPOST['frmUserOldPassword']), 'text', 'y', 100);
     $objValid->add_text_field('New Password', strip_tags($argArrPOST['frmUserNewPassword']), 'text', 'y', 100);
     $objValid->add_text_field('Confirm New Password', strip_tags($argArrPOST['frmUserConfirmPassword']), 'text', 'y', 100);
     if ($objValid->validation()) {
         $errorMsgFirst = 'Please enter required fields!';
     } else {
         $errorMsg = $objValid->create_msg();
     }
     if ($varNewPassword != '' && $varConfirmPassword != '') {
         if ($varNewPassword != $varConfirmPassword) {
             $varErrorMessage = "New Password and Confirm New Password must be same.<br />";
             $errorMsg .= $varErrorMessage;
         }
     }
     if ($errorMsg) {
         $_SESSION["sessChangeUserPassword"] = $argArrPOST;
         $objCore->setErrorMsg($errorMsg);
         return false;
     } else {
         //*** server side validation end here
         $arrCol = array('pkCustomerID');
         $varWhereCondition = " AND CustomerEmailID ='" . $_SESSION['sessCustomerUserName'] . "' AND CustomerPassword = encode('" . $varOldPassword . "','Demo Shop')";
         $varResultRows = $this->getUserNumRows($varWhereCondition);
         if ($varResultRows) {
             //check for valid password
             if (!preg_match("/^[a-zA-Z0-9\\-\\!\\_\\#\\@]+\$/u", $varNewPassword)) {
                 $_SESSION["sessChangeUserPassword"] = $argArrPOST;
                 $objCore->setErrorMsg(ADMIN_SETTING_PAGE_PASSWORD_CHECK);
                 return false;
             } else {
                 //end check for valid password
                 $arrColumns = array('CustomerPassword' => 'encode(\'' . $varNewPassword . '\',\'Demo Shop\')');
                 $varWhere = "pkCustomerID ='" . $_SESSION['sessCustomerID'] . "'";
                 $_SESSION['sessChangeUserPassword'] = '';
                 $_SESSION['sessChangeUserPassword'] = $varNewPassword;
                 $varAffectedRows = $this->update(TABLE_CUSTOMERS, $arrColumns, $varWhere);
                 $this->sendChangePassMailToUser($argArrPOST);
                 $objCore->setSuccessMsg(ADMIN_CHANGE_PASSWORD_MSG);
                 return true;
             }
         } else {
             $objCore->setErrorMsg(ADMIN_CHANGE_PASSWORD_ERR);
             return false;
         }
     }
 }
开发者ID:saurabhs4,项目名称:demoshop,代码行数:58,代码来源:class.customer_login.php


注:本文中的Core::setSuccessMsg方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。