• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ps_DB类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: traverse_tree_down

 function traverse_tree_down(&$mymenu_content, $category_id = '0', $level = '0')
 {
     static $ibg = 0;
     global $db, $mosConfig_live_site;
     $db = new ps_DB();
     $level++;
     $query = "SELECT category_name as cname, category_id as cid, category_child_id as ccid " . "FROM #__{vm}_category as a, #__{vm}_category_xref as b " . "WHERE a.category_publish='Y' AND " . " b.category_parent_id='{$category_id}' AND a.category_id=b.category_child_id " . "ORDER BY category_parent_id, list_order, category_name ASC";
     $db->query($query);
     $categories = $db->record;
     if (!($categories == null)) {
         $i = 1;
         $numCategories = count($categories);
         foreach ($categories as $category) {
             $ibg++;
             $Treeid = $ibg;
             $itemid = isset($_REQUEST['Itemid']) ? '&Itemid=' . intval($_REQUEST['Itemid']) : "";
             $mymenu_content .= str_repeat("\t", $level - 1);
             if ($level > 1 && $i == 1) {
                 $mymenu_content .= ",";
             }
             $mymenu_content .= "['" . $category->cname;
             $mymenu_content .= "','href=\\'" . sefRelToAbs('index.php?option=com_virtuemart&page=shop.browse&category_id=' . $category->cid . '&Treeid=' . $Treeid . $itemid) . "\\''\n ";
             /* recurse through the subcategories */
             $this->traverse_tree_down($mymenu_content, $category->ccid, $level);
             $mymenu_content .= str_repeat("\t", $level - 1);
             /* let's see if the loop has reached its end */
             if ($i == sizeof($categories) && $level == 1) {
                 $mymenu_content .= "]\n";
             } else {
                 $mymenu_content .= "],\n";
             }
             $i++;
         }
     }
 }
开发者ID:rafarubert,项目名称:megafiltros,代码行数:35,代码来源:vm_tigratree.php


示例2: authUser

function authUser($acc, $pwd)
{
    if ($acc && $pwd) {
        $db = new ps_DB();
        $pwd = md5($pwd);
        $sql = "select ID, name, authority from account where username='{$acc}' and password='{$pwd}' ";
        $db->query($sql);
        if ($db->next_record()) {
            return $db->f('ID');
        } else {
            return 0;
        }
    } else {
        return 0;
    }
}
开发者ID:ookeyLai,项目名称:ikareHealth,代码行数:16,代码来源:mymessages.php


示例3: add

 /**
  * add a Product into a Product Type
  * @author Zdenek Dvorak
  *
  * @param array $d
  * @return boolean
  */
 function add(&$d)
 {
     global $VM_LANG;
     $db = new ps_DB();
     if ($this->validate_add($d)) {
         $q = "INSERT INTO #__{vm}_product_product_type_xref (product_id, product_type_id) ";
         $q .= "VALUES ('" . $d["product_id"] . "','" . $d["product_type_id"] . "')";
         $db->query($q);
         $q = "INSERT INTO #__{vm}_product_type_" . $d["product_type_id"] . " (product_id) ";
         $q .= "VALUES ('" . $d["product_id"] . "')";
         $db->query($q);
         $GLOBALS['vmLogger']->info($VM_LANG->_('VM_PRODUCT_PRODUCT_TYPE_ASSIGNED'));
         return true;
     } else {
         return False;
     }
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:24,代码来源:ps_product_product_type.php


示例4: traverse_tree_down

 function traverse_tree_down(&$mymenu_content, $category_id = '0', $level = '0')
 {
     static $ibg = 0;
     global $mosConfig_live_site, $sess;
     $level++;
     $query = "SELECT category_name, category_id, category_child_id " . "FROM #__{vm}_category as a, #__{vm}_category_xref as b " . "WHERE a.category_publish='Y' AND " . " b.category_parent_id='{$category_id}' AND a.category_id=b.category_child_id " . "ORDER BY category_parent_id, list_order, category_name ASC";
     $db = new ps_DB();
     $db->query($query);
     while ($db->next_record()) {
         $itemid = '&Itemid=' . $sess->getShopItemid();
         if ($ibg != 0) {
             $mymenu_content .= ",";
         }
         $mymenu_content .= "\n[ '<img src=\"' + ctThemeXPBase + 'darrow.png\" alt=\"arr\" />','" . $db->f("category_name", false) . "','" . sefRelToAbs('index.php?option=com_virtuemart&page=shop.browse&category_id=' . $db->f("category_id") . $itemid) . "',null,'" . $db->f("category_name", false) . "'\n ";
         $ibg++;
         /* recurse through the subcategories */
         $this->traverse_tree_down($mymenu_content, $db->f("category_child_id"), $level);
         /* let's see if the loop has reached its end */
         $mymenu_content .= "]";
     }
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:21,代码来源:vm_JSCook.php


示例5: ps_DB

* @ modified by soeren
* @ Uses dTree Javascript: http://www.destroydrop.com/javascripts/tree/
* @ version $Id: mod_dtreemenu.php
*
* This file is included by the virtuemart module if the module parameter
* MenuType is set to treemenu
**/
global $root_label, $sess, $db, $mosConfig_live_site, $mm_action_url;
if (vmIsJoomla('1.5')) {
    $js_src = $mosConfig_live_site . '/modules/mod_virtuemart';
} else {
    $js_src = $mosConfig_live_site . '/modules';
}
$Itemid = vmRequest::getInt('Itemid');
if (@get_class($db) != 'ps_DB') {
    $db = new ps_DB();
}
require_once CLASSPATH . "ps_product_category.php";
$ps_product_category = new ps_product_category();
/*********************************************************
************* CATEGORY TREE ******************************
*/
/* dTree API, default value
 * change to fit your needs **/
$useSelection = 'true';
$useLines = 'true';
$useIcons = 'true';
$useStatusText = 'false';
$useCookies = 'false';
$closeSameLevel = 'false';
// if all folders should be open, we will ignore the closeSameLevel
开发者ID:dalinhuang,项目名称:joomla-goods-china,代码行数:31,代码来源:vm_dtree.php


示例6: show_configuration

    /**
     * Show all configuration parameters for this payment method
     * @returns boolean False when the Payment method has no configration
     */
    function show_configuration()
    {
        global $VM_LANG;
        $database = new ps_DB();
        /** Read current Configuration ***/
        require_once CLASSPATH . "payment/" . $this->classname . ".cfg.php";
        ?>
      <table>
        <tr>
            <td><strong><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_2CHECKOUT_LOGIN');
        ?>
</strong></td>
            <td>
                <input type="text" name="TWOCO_LOGIN" class="inputbox" value="<?php 
        echo TWOCO_LOGIN;
        ?>
" />
            </td>
            <td><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_2CHECKOUT_LOGIN_EXPLAIN');
        ?>
</td>
        </tr>
        <tr>
            <td><strong><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_2CHECKOUT_SECRETWORD');
        ?>
</strong></td>
            <td>
                <input type="text" name="TWOCO_SECRETWORD" class="inputbox" value="<?php 
        echo TWOCO_SECRETWORD;
        ?>
" />
            </td>
            <td><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_2CHECKOUT_SECRETWORD_EXPLAIN');
        ?>
</td>
        </tr>
        <tr>
            <td><strong><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYMENT_ORDERSTATUS_SUCC');
        ?>
</strong></td>
            <td>
                <select name="TWOCO_VERIFIED_STATUS" class="inputbox" >
                <?php 
        $q = "SELECT order_status_name,order_status_code FROM #__{vm}_order_status ORDER BY list_order";
        $database->query($q);
        $rows = $database->record;
        $order_status_code = array();
        $order_status_name = array();
        foreach ($rows as $row) {
            $order_status_code[] = $row->order_status_code;
            $order_status_name[] = $row->order_status_name;
        }
        for ($i = 0; $i < sizeof($order_status_code); $i++) {
            echo "<option value=\"" . $order_status_code[$i];
            if (TWOCO_VERIFIED_STATUS == $order_status_code[$i]) {
                echo "\" selected=\"selected\">";
            } else {
                echo "\">";
            }
            echo $order_status_name[$i] . "</option>\n";
        }
        ?>
                    </select>
            </td>
            <td><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYMENT_ORDERSTATUS_SUCC_EXPLAIN');
        ?>
            </td>
        </tr>
            <tr>
            <td><strong><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYMENT_ORDERSTATUS_FAIL');
        ?>
</strong></td>
            <td>
                <select name="TWOCO_INVALID_STATUS" class="inputbox" >
                <?php 
        for ($i = 0; $i < sizeof($order_status_code); $i++) {
            echo "<option value=\"" . $order_status_code[$i];
            if (TWOCO_INVALID_STATUS == $order_status_code[$i]) {
                echo "\" selected=\"selected\">";
            } else {
                echo "\">";
            }
            echo $order_status_name[$i] . "</option>\n";
        }
        ?>
                    </select>
            </td>
            <td><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYMENT_ORDERSTATUS_FAIL_EXPLAIN');
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:101,代码来源:ps_twocheckout.php


示例7: show_configuration

    /**
     * Show all configuration parameters for this payment method
     * @returns boolean False when the Payment method has no configration
     */
    function show_configuration()
    {
        global $VM_LANG;
        $db = new ps_DB();
        /** Read current Configuration ***/
        require_once CLASSPATH . "payment/" . $this->classname . ".cfg.php";
        ?>
      <table>
        <tr>
            <td><strong><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PN_LOGIN');
        ?>
</strong></td>
            <td>
                <input type="text" name="PN_LOGIN" class="inputbox" value="<?php 
        echo PN_LOGIN;
        ?>
" />
            </td>
            <td><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PN_LOGIN_EXPLAIN');
        ?>
</td>
        </tr>
        <tr>
            <td><strong><?php 
        echo $VM_LANG->_('PHPSHOP_PAYMENT_CVV2');
        ?>
</strong></td>
            <td>
                <select name="PN_CHECK_CARD_CODE" class="inputbox">
                <option <?php 
        if (PN_CHECK_CARD_CODE == 'YES') {
            echo "selected=\"selected\"";
        }
        ?>
 value="YES">
                <?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_YES');
        ?>
</option>
                <option <?php 
        if (PN_CHECK_CARD_CODE == 'NO') {
            echo "selected=\"selected\"";
        }
        ?>
 value="NO">
                <?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_NO');
        ?>
</option>
                </select>
            </td>
            <td><?php 
        echo $VM_LANG->_('PHPSHOP_PAYMENT_CVV2_TOOLTIP');
        ?>
</td>
        </tr>
        <tr>
            <td><strong><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYMENT_ORDERSTATUS_SUCC');
        ?>
</strong></td>
            <td>
                <select name="PN_VERIFIED_STATUS" class="inputbox" >
                <?php 
        $q = "SELECT order_status_name,order_status_code FROM #__{vm}_order_status ORDER BY list_order";
        $db->query($q);
        $order_status_code = array();
        $order_status_name = array();
        while ($db->next_record()) {
            $order_status_code[] = $db->f("order_status_code");
            $order_status_name[] = $db->f("order_status_name");
        }
        for ($i = 0; $i < sizeof($order_status_code); $i++) {
            echo "<option value=\"" . $order_status_code[$i];
            if (PN_VERIFIED_STATUS == $order_status_code[$i]) {
                echo "\" selected=\"selected\">";
            } else {
                echo "\">";
            }
            echo $order_status_name[$i] . "</option>\n";
        }
        ?>
                    </select>
            </td>
            <td><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYMENT_ORDERSTATUS_SUCC_EXPLAIN');
        ?>
</td>
        </tr>
            <tr>
            <td><strong><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYMENT_ORDERSTATUS_FAIL');
        ?>
</strong></td>
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:101,代码来源:ps_paymenow.php


示例8: ps_DB

 // Set the internal VirtueMart pathway
 $tpl->set('pathway', $pathway);
 $vmPathway = $tpl->fetch('common/pathway.tpl.php');
 $tpl->set('vmPathway', $vmPathway);
 // Get bill_to information
 $dbbt = new ps_DB();
 $q = "SELECT * FROM `#__{vm}_order_user_info` WHERE order_id='" . $db->f("order_id") . "' ORDER BY address_type ASC";
 $dbbt->query($q);
 $dbbt->next_record();
 $old_user = '';
 if (!empty($user) && is_object($user)) {
     $old_user = $user;
 }
 $user = $dbbt->record[0];
 /** Retrieve Payment Info **/
 $dbpm = new ps_DB();
 $q = "SELECT * FROM `#__{vm}_payment_method` p, `#__{vm}_order_payment` op, `#__{vm}_orders` o ";
 $q .= "WHERE op.order_id='{$order_id}' ";
 $q .= "AND p.payment_method_id=op.payment_method_id ";
 $q .= "AND o.user_id='" . $auth["user_id"] . "' ";
 $q .= "AND o.order_id='{$order_id}' ";
 $dbpm->query($q);
 $dbpm->next_record();
 $registrationfields = ps_userfield::getUserFields('registration', false, '', true, true);
 $shippingfields = ps_userfield::getUserFields('shipping', false, '', true, true);
 $tpl->set('db', $db);
 $tpl->set('dbbt', $dbbt);
 $tpl->set('dbpm', $dbpm);
 $tpl->set('user', $user);
 $tpl->set('order_id', $order_id);
 $tpl->set('registrationfields', $registrationfields);
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:account.order_details.php


示例9: mail_question

 /**
  */
 function mail_question(&$d)
 {
     global $vmLogger, $Itemid, $_SESSION, $VM_LANG, $mosConfig_live_site, $mosConfig_lang, $sess;
     $db = new ps_DB();
     $product_id = (int) $d["product_id"];
     $q = 'SELECT * FROM #__{vm}_product WHERE product_id=' . $product_id . ' AND product_publish=\'Y\'';
     $db->query($q);
     if (!$db->next_record()) {
         $vmLogger->err($VM_LANG->_('NOT_AUTH', false));
         return false;
     }
     if ($db->f("product_sku") != @$d["product_sku"]) {
         $vmLogger->err($VM_LANG->_('NOT_AUTH', false));
         return false;
     }
     $Itemid = $sess->getShopItemid();
     $flypage = vmGet($_REQUEST, "flypage", null);
     // product url
     $product_url = $mosConfig_live_site . "/index.php?option=com_virtuemart&page=shop.product_details&flypage=" . urlencode($flypage) . "&product_id={$product_id}&Itemid={$Itemid}";
     $dbv = new ps_DB();
     $qt = "SELECT * from #__{vm}_vendor ";
     $qt .= "WHERE vendor_id = '" . $_SESSION['ps_vendor_id'] . "'";
     $dbv->query($qt);
     $dbv->next_record();
     $vendor_email = $dbv->f("contact_email");
     $shopper_email = $d["email"];
     $shopper_name = $d["name"];
     $subject_msg = vmRequest::getVar('text', '', 'post');
     $shopper_subject = sprintf($VM_LANG->_('VM_ENQUIRY_SHOPPER_EMAIL_SUBJECT'), $dbv->f("vendor_name"));
     $shopper_msg = str_replace('{vendor_name}', $dbv->f("vendor_name"), $VM_LANG->_('VM_ENQUIRY_SHOPPER_EMAIL_MESSAGE'));
     $shopper_msg = str_replace('{product_name}', $db->f("product_name"), $shopper_msg);
     $shopper_msg = str_replace('{product_sku}', $db->f("product_sku"), $shopper_msg);
     $shopper_msg = str_replace('{product_url}', $product_url, $shopper_msg);
     $shopper_msg = vmHtmlEntityDecode($shopper_msg);
     //
     $vendor_subject = sprintf($VM_LANG->_('VM_ENQUIRY_VENDOR_EMAIL_SUBJECT'), $dbv->f("vendor_name"), $db->f("product_name"));
     $vendor_msg = str_replace('{shopper_name}', $shopper_name, $VM_LANG->_('VM_ENQUIRY_VENDOR_EMAIL_MESSAGE'));
     $vendor_msg = str_replace('{shopper_message}', $subject_msg, $vendor_msg);
     $vendor_msg = str_replace('{shopper_email}', $shopper_email, $vendor_msg);
     $vendor_msg = str_replace('{product_name}', $db->f("product_name"), $vendor_msg);
     $vendor_msg = str_replace('{product_sku}', $db->f("product_sku"), $vendor_msg);
     $vendor_msg = str_replace('{product_url}', $product_url, $vendor_msg);
     $vendor_msg = vmHtmlEntityDecode($vendor_msg);
     //END: set up text mail
     /////////////////////////////////////
     // Send text email
     //
     if (ORDER_MAIL_HTML == '0') {
         // Mail receipt to the shopper
         vmMail($vendor_email, $dbv->f("vendor_name"), $shopper_email, $shopper_subject, $shopper_msg, "");
         // Mail receipt to the vendor
         vmMail($shopper_email, $shopper_name, $vendor_email, $vendor_subject, $vendor_msg, "");
     } elseif (ORDER_MAIL_HTML == '1') {
         // Mail receipt to the vendor
         $template = vmTemplate::getInstance();
         $template->set_vars(array('vendorname' => $dbv->f("vendor_name"), 'subject' => nl2br($subject_msg), 'contact_name' => $shopper_name, 'contact_email' => $shopper_email, 'product_name' => $db->f("product_name"), 'product_s_description' => $db->f("product_s_desc"), 'product_url' => $product_url, 'product_sku' => $db->f("product_sku")));
         if ($db->f("product_thumb_image")) {
             $imagefile = pathinfo($db->f("product_thumb_image"));
             $extension = $imagefile['extension'] == "jpg" ? "jpeg" : "jpeg";
             $EmbeddedImages[] = array('path' => IMAGEPATH . "product/" . $db->f("product_thumb_image"), 'name' => "product_image", 'filename' => $db->f("product_thumb_image"), 'encoding' => "base64", 'mimetype' => "image/" . $extension);
             $template->set('product_thumb', '<img src="cid:product_image" alt="product_image" border="0" />');
             $body = $template->fetch('order_emails/enquiry_email.tpl.php');
             $vendor_mail = vmMail($shopper_email, $shopper_name, $vendor_email, $vendor_subject, $body, $vendor_msg, true, null, null, $EmbeddedImages);
         } else {
             $template->set('product_thumb', '');
             $body = $template->fetch('order_emails/enquiry_email.tpl.php');
             $vendor_mail = vmMail($shopper_email, $shopper_name, $vendor_email, $vendor_subject, $body, $vendor_msg, true, null, null, null);
         }
         //Send sender confirmation email
         $sender_mail = vmMail($vendor_email, $dbv->f("vendor_name"), $shopper_email, $shopper_subject, $shopper_msg, "");
         if (!$vendor_mail || !$sender_mail) {
             $vmLogger->debug('Something went wrong while sending the enquiry email to ' . $vendor_email . ' and ' . $shopper_email);
             return false;
         }
     }
     return true;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:79,代码来源:ps_communication.php


示例10: ps_DB

echo '<br />';

$varname = 'PHPSHOP_CHECKOUT_MSG_' . CHECK_OUT_GET_FINAL_CONFIRMATION;
echo '<h5>'. $VM_LANG->_($varname) . '</h5>';
$db = new ps_DB();

echo '<table>';
// Begin with Shipping Address
if(!ps_checkout::noShipToNecessary()) {

	$db->query("SELECT * FROM #__{vm}_user_info WHERE user_info_id='".strip_tags($_REQUEST['ship_to_info_id'])."'");
	$db->next_record();

	echo '<tr><td valign="top"><strong>'.$VM_LANG->_('PHPSHOP_ADD_SHIPTO_2') . ":</strong></td>";
	echo '<td>';
	$dbs = new ps_DB();
	$q = "SELECT * FROM #__{vm}_country WHERE country_3_code='".$db->f("country")."'";
	$dbs->query($q);
	$country_id = $dbs->f("country_id");
	$q = "SELECT * FROM #__{vm}_state WHERE country_id=".$country_id." AND state_2_code='".$db->f("state")."'";
	$dbs->query($q);
	$state_name = $dbs->f("state_name");
	echo vmFormatAddress( array('name' => $db->f("first_name")." ".$db->f("last_name"),
        								'address_1' => $db->f("address_1"),
        								'address_2' => $db->f("address_2"),
        								'state' => $db->f("state"),
        								'state_name' => $state_name,
        								'zip' => $db->f("zip"),
        								'city' => $db->f("city"),
        								'country' => $db->f('country')
        							), true );
开发者ID:rubengarcia0510,项目名称:tienda,代码行数:31,代码来源:get_final_confirmation.tpl.php


示例11: show_configuration

    /**
     * Show all configuration parameters for this payment method
     * @returns boolean False when the Payment method has no configration
     */
    function show_configuration()
    {
        global $VM_LANG, $mosConfig_live_site;
        $db = new ps_DB();
        /** Read current Configuration ***/
        require_once CLASSPATH . "payment/" . __CLASS__ . ".cfg.php";
        ?>
    
			<table style="text-align: left;">
        <tr>
            <td><strong><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_EPAY_MERCHANTNUMBER');
        ?>
</strong></td>
            <td>
                <input type="text" name="EPAY_MERCHANTNUMBER" class="inputbox" value="<?php 
        echo EPAY_MERCHANTNUMBER;
        ?>
" />
            </td>
            <td><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_EPAY_MERCHANTNUMBER_EXPLAIN');
        ?>
</td>
        </tr>
        <tr>
            <td><strong><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYPAL_STATUS_SUCCESS');
        ?>
</strong></td>
            <td>
                <select name="EPAY_VERIFIED_STATUS" class="inputbox" >
                <?php 
        $q = "SELECT order_status_name,order_status_code FROM #__{vm}_order_status where order_status_code != 'P' ORDER BY list_order";
        $db->query($q);
        $order_status_code = array();
        $order_status_name = array();
        while ($db->next_record()) {
            $order_status_code[] = $db->f("order_status_code");
            $order_status_name[] = $db->f("order_status_name");
        }
        for ($i = 0; $i < sizeof($order_status_code); $i++) {
            echo "<option value=\"" . $order_status_code[$i];
            if (EPAY_VERIFIED_STATUS == $order_status_code[$i]) {
                echo "\" selected=\"selected\">";
            } else {
                echo "\">";
            }
            echo $order_status_name[$i] . "</option>\n";
        }
        ?>
                    </select>
            </td>
            <td><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYPAL_STATUS_SUCCESS_EXPLAIN');
        ?>
            </td>
        </tr>
            <tr>
            <td><strong><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYPAL_STATUS_FAILED');
        ?>
</strong></td>
            <td>
                <select name="EPAY_INVALID_STATUS" class="inputbox" >
                <?php 
        $q = "SELECT order_status_name,order_status_code FROM #__{vm}_order_status ORDER BY list_order";
        $db->query($q);
        $order_status_code = array();
        $order_status_name = array();
        while ($db->next_record()) {
            $order_status_code[] = $db->f("order_status_code");
            $order_status_name[] = $db->f("order_status_name");
        }
        for ($i = 0; $i < sizeof($order_status_code); $i++) {
            echo "<option value=\"" . $order_status_code[$i];
            if (EPAY_INVALID_STATUS == $order_status_code[$i]) {
                echo "\" selected=\"selected\">";
            } else {
                echo "\">";
            }
            echo $order_status_name[$i] . "</option>\n";
        }
        ?>
                    </select>
            </td>
            <td><?php 
        echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYPAL_STATUS_FAILED_EXPLAIN');
        ?>
</td>
        </tr>
        <script language="JavaScript">
          function enableDisableAll() {
            if (document.all.EPAY_CARDTYPES_0.checked) {
              document.all.EPAY_CARDTYPES_1.disabled = true;
              document.all.EPAY_CARDTYPES_2.disabled = true;
//.........这里部分代码省略.........
开发者ID:noikiy,项目名称:owaspbwa,代码行数:101,代码来源:ps_epay.php


示例12:

$sess = new ps_session;


$query  = "SELECT DISTINCT m.manufacturer_id, m.mf_name
					FROM #__{vm}_manufacturer m
					LEFT JOIN #__{vm}_product_mf_xref mx ON mx.manufacturer_id = m.manufacturer_id
					LEFT JOIN #__{vm}_product p ON p.product_id = mx.product_id
					LEFT JOIN #__{vm}_product_category_xref cx ON cx.product_id = p.product_id
					WHERE cx.category_id =".(int)$category_id;
$query .= " ORDER BY m.mf_name ASC";

$query_all  = "SELECT m.manufacturer_id,m.mf_name FROM #__{vm}_manufacturer m ";
$query_all .= "ORDER BY m.mf_name ASC";

$db = new ps_DB;
if ($auto == 1 && !empty( $category_id ) ) {
	$db->query( $query );
} else {
	$db->query( $query_all );
}
$res = $db->record;
if( empty( $res )) {
	if( $auto == 1 ) {
		$db->query( $query_all );
		$res = $db->record;
	} else {
		echo 'No manufacturers defined!';
		return;
	}
}
开发者ID:rubengarcia0510,项目名称:tienda,代码行数:30,代码来源:mod_virtuemart_manufacturers.php


示例13: get_customer_num

 /**
  * Retrieves the Customer Number of the user specified by ID
  *
  * @param int $id
  * @return string
  */
 function get_customer_num($id)
 {
     $db = new ps_DB();
     $q = "SELECT customer_number FROM #__{vm}_shopper_vendor_xref ";
     $q .= "WHERE user_id='" . $id . "' ";
     $db->query($q);
     $db->next_record();
     return $db->f("customer_number");
 }
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:15,代码来源:ps_shopper_group.php


示例14:

  
	<br /><br />
	<?php 
echo $VM_LANG->_('PHPSHOP_EMAIL_SENDTO') . ": <strong>" . $user->user_email . '</strong>';
?>
<br />
</p>
  
<!-- Begin Payment Information -->
<?php 
if (empty($auth['user_id'])) {
    return;
}
if ($db->f("order_status") == "P") {
    // Copy the db object to prevent it gets altered
    $db_temp = ps_DB::_clone($db);
    /** Start printing out HTML Form code (Payment Extra Info) **/
    ?>
 <br />
<table width="100%">
  <tr>
    <td width="100%" align="center">
    	<?php 
    /**
     * PLEASE DON'T CHANGE THIS SECTION UNLESS YOU KNOW WHAT YOU'RE DOING
     */
    // Try to get PayPal/PayMate/Worldpay/whatever Configuration File
    @(include CLASSPATH . "payment/" . $db->f("payment_class") . ".cfg.php");
    $vmLogger->debug('Beginning to parse the payment extra info code...');
    // Here's the place where the Payment Extra Form Code is included
    // Thanks to Steve for this solution (why make it complicated...?)
开发者ID:noikiy,项目名称:owaspbwa,代码行数:30,代码来源:checkout.thankyou.tpl.php


示例15: creditcard_lists

 /**
  * Build a Credit Card list for each CreditCard Payment Method
  * Uses JavsScript from mambojavascript: changeDynaList()
  *
  * @param ps_DB $db_cc
  * @return string
  */
 function creditcard_lists(&$db_cc)
 {
     global $mainframe;
     if (vmIsJoomla('1.5')) {
         $document = JFactory::getDocument();
         $document->addScript('includes/js/joomla.javascript.js');
     }
     $db = new ps_DB();
     $db_cc->next_record();
     // Build the Credit Card lists for each CreditCard Payment Method
     $script = "<script language=\"javascript\" type=\"text/javascript\">\n";
     $script .= "<!--\n";
     $script .= "var originalOrder = '1';\n";
     $script .= "var originalPos = '" . $db_cc->f("payment_method_name") . "';\n";
     $script .= "var orders = new Array();\t// array in the format [key,value,text]\n";
     $i = 0;
     $db_cc->reset();
     while ($db_cc->next_record()) {
         $accepted_creditcards = explode(",", $db_cc->f("accepted_creditcards"));
         $cards = array();
         foreach ($accepted_creditcards as $value) {
             if (!empty($value)) {
                 $q = 'SELECT creditcard_code,creditcard_name FROM #__{vm}_creditcard WHERE creditcard_id=' . (int) $value;
                 $db->query($q);
                 $db->next_record();
                 $cards[$db->f('creditcard_code')] = shopMakeHtmlSafe($db->f('creditcard_name'));
             }
         }
         foreach ($cards as $code => $name) {
             $script .= "orders[" . $i++ . "] = new Array( '" . addslashes($db_cc->f("payment_method_name")) . "','{$code}','{$name}' );\n";
         }
     }
     $script .= "function changeCreditCardList() { \n";
     $script .= "var selected_payment = null;\n      for (var i=0; i<document.adminForm.payment_method_id.length; i++)\n         if (document.adminForm.payment_method_id[i].checked)\n            selected_payment = document.adminForm.payment_method_id[i].id;\n";
     $script .= "changeDynaList('creditcard_code',orders,selected_payment, originalPos, originalOrder);\n";
     $script .= "}\n";
     $script .= "//-->\n";
     $script .= "</script>\n";
     $script .= '<noscript>' . ps_html::selectList('creditcard_code', key($cards), $cards) . '</noscript>';
     return $script;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:48,代码来源:ps_creditcard.php


示例16: ps_DB

$show_accountlink = $params->get('show_accountlink', 'yes');
$useGreyBox_accountlink = $params->get('useGreyBox_accountlink', '0');
$show_minicart = $params->get('show_minicart', 'yes');
$useGreyBox_cartlink = $params->get('useGreyBox_cartlink', '0');
$show_productsearch = $params->get('show_productsearch', 'yes');
$show_product_parameter_search = $params->get('show_product_parameter_search', 'no');
$menutype = $params->get('menutype', "links");
$class_sfx = $params->get('class_sfx', '');
$pretext = $params->get('pretext', '');
$jscookMenu_style = $params->get('jscookMenu_style', 'ThemeOffice');
$jscookTree_style = $params->get('jscookTree_style', 'ThemeXP');
$jscook_type = $params->get('jscook_type', 'menu');
$menu_orientation = $params->get('menu_orientation', 'hbr');
$_REQUEST['root_label'] = $params->get('root_label', 'Shop');
$class_mainlevel = "mainlevel" . $class_sfx;
$db = new ps_DB();
// This is "Categories:" by default. Change it in the Module Parameters Form
echo $pretext;
// update the cart because something could have
// changed while running a function
$cart = $_SESSION["cart"];
$auth = $_SESSION["auth"];
if ($show_categories == "yes") {
    if ($menutype == 'links') {
        /* MENUTPYE LINK LIST */
        echo $ps_product_category->get_category_tree($category_id, $class_mainlevel);
    } elseif ($menutype == "transmenu") {
        /* TransMenu script to display a DHTML Drop-Down Menu */
        include_once $mod_dir . '/vm_transmenu.php';
    } elseif ($menutype == "dtree") {
        /* dTree script to display structured categories */
开发者ID:dalinhuang,项目名称:joomla-goods-china,代码行数:31,代码来源:mod_virtuemart.php


示例17: updateRecords

    /**
     * This is the main function which stores the order information in the database
     * 
     * @author Ashish Solanki!
     * @return boolean
     */
    function updateRecords($order_number, $order_total, &$d)
    {
        require_once CLASSPATH . 'ps_checkout.php';
        $ps_chkout = new ps_checkout();
        global $order_tax_details, $afid, $VM_LANG, $auth, $my, $mosConfig_offset, $vmLogger, $vmInputFilter, $discount_factor;
        $ps_vendor_id = $_SESSION["ps_vendor_id"];
        $cart = $_SESSION['cart'];
        require_once CLASSPATH . 'ps_payment_method.php';
        $ps_payment_method = new ps_payment_method();
        require_once CLASSPATH . 'ps_product.php';
        $ps_product = new ps_product();
        require_once CLASSPATH . 'ps_cart.php';
        $ps_cart = new ps_cart();
        $db = new ps_DB();
        $totals = $ps_chkout->calc_order_totals($d);
        extract($totals);
        $timestamp = time();
        //Custom
        $vmLogger->debug('-- Checkout Debug--
							Subtotal: ' . $order_subtotal . '
							Taxable: ' . $order_taxable . '
							Payment Discount: ' . $payment_discount . '
							Coupon Discount: ' . $coupon_discount . '
							Shipping: ' . $order_shipping . '
							Shipping Tax : ' . $order_shipping_tax . '
							Tax : ' . $order_tax . '
							------------------------
							Order Total: ' . $order_total . '
							----------------------------');
        // Check to see if Payment Class File exists
        $payment_class = $ps_payment_method->get_field($d["payment_method_id"], "payment_class");
        $d['new_order_status'] = 'P';
        // This is meant to be updated by a payment modules' process_payment method
        if (!class_exists($payment_class)) {
            include CLASSPATH . "payment/{$payment_class}.php";
        }
        $_PAYMENT = new $payment_class();
        // Remove the Coupon, because it is a Gift Coupon and now is used!!
        if (@$_SESSION['coupon_type'] == "gift") {
            $d['coupon_id'] = $_SESSION['coupon_id'];
            include_once CLASSPATH . 'ps_coupon.php';
            ps_coupon::remove_coupon_code($d);
        }
        // Get the IP Address
        if (!empty($_SERVER['REMOTE_ADDR'])) {
            $ip = $_SERVER['REMOTE_ADDR'];
        } else {
            $ip = 'unknown';
        }
        // Collect all fields and values to store them!
        $fields = array('user_id' => $auth["user_id"], 'vendor_id' => $ps_vendor_id, 'order_number' => $order_number, 'user_info_id' => $d["ship_to_info_id"], 'ship_method_id' => @urldecode($d["shipping_rate_id"]), 'order_total' => $order_total, 'order_subtotal' => $order_subtotal, 'order_tax' => $order_tax, 'order_tax_details' => serialize($order_tax_details), 'order_shipping' => $order_shipping, 'order_shipping_tax' => $order_shipping_tax, 'order_discount' => $payment_discount, 'coupon_discount' => $coupon_discount, 'coupon_code' => @$_SESSION['coupon_code'], 'order_currency' => $GLOBALS['product_currency'], 'order_status' => 'P', 'cdate' => $timestamp, 'mdate' => $timestamp, 'customer_note' => htmlspecialchars(vmRequest::getString('customer_note', '', 'POST', 'none'), ENT_QUOTES), 'ip_address' => $ip);
        // Insert the main order information
        $db->buildQuery('INSERT', '#__{vm}_orders', $fields);
        $result = $db->query();
        $d["order_id"] = $order_id = $db->last_insert_id();
        if ($result === false || empty($order_id)) {
            $vmLogger->crit('Adding the Order into the Database failed! User ID: ' . $auth["user_id"]);
            return false;
        }
        // Insert the initial Order History.
        $mysqlDatetime = date("Y-m-d G:i:s", $timestamp);
        $fields = array('order_id' => $order_id, 'order_status_code' => 'P', 'date_added' => $mysqlDatetime, 'customer_notified' => 1, 'comments' => '');
        $db->buildQuery('INSERT', '#__{vm}_order_history', $fields);
        $db->query();
        /**
         * Insert the Order payment info 
         */
        $payment_number = str_replace(array(' ', '|', '-'), '', @$_SESSION['ccdata']['order_payment_number']);
        $d["order_payment_code"] = @$_SESSION['ccdata']['credit_card_code'];
        // Payment number is encrypted using mySQL encryption functions.
        $fields = array('order_id' => $order_id, 'payment_method_id' => $d["payment_method_id"], 'order_payment_log' => @$d["order_payment_log"], 'order_payment_trans_id' => $vmInputFilter->safeSQL(@$d["order_payment_trans_id"]));
        if (!empty($payment_number) && VM_STORE_CREDITCARD_DATA == '1') {
            // Store Credit Card Information only if the Store Owner has decided to do so
            $fields['order_payment_code'] = $d["order_payment_code"];
            $fields['order_payment_expire'] = @$_SESSION["ccdata"]["order_payment_expire"];
            $fields['order_payment_name'] = @$_SESSION["ccdata"]["order_payment_name"];
            $fields['order_payment_number'] = VM_ENCRYPT_FUNCTION . "( '{$payment_number}','" . ENCODE_KEY . "')";
            $specialfield = array('order_payment_number');
        } else {
            $specialfield = array();
        }
        $db->buildQuery('INSERT', '#__{vm}_order_payment', $fields, '', $specialfield);
        $db->query();
        /**
         * Insert the User Billto & Shipto Info
         */
        // First: get all the fields from the user field list to copy them from user_info into the order_user_info
        $fields = array();
        require_once CLASSPATH . 'ps_userfield.php';
        $userfields = ps_userfield::getUserFields('', false, '', true, true);
        foreach ($userfields as $field) {
            if ($field->name == 'email') {
                $fields[] = 'user_email';
            } else {
//.........这里部分代码省略.........
开发者ID:atomtechnologyltd,项目名称:VM9_paynetz_for_Joomla1.5_updated,代码行数:101,代码来源:ps_nbpaynetz.php


示例18: getOrderStatusName

 /**
  * Returns the order status name for a given order status code
  *
  * @param string $order_status_code
  * @return string
  */
 function getOrderStatusName($order_status_code)
 {
     if (empty($GLOBALS['order_status'][$order_status_code])) {
         $db = new ps_DB();
         $q = "SELE 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ps_product类代码示例发布时间:2022-05-23
下一篇:
PHP proveedor类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap