Example #1
0
 * Release Date: 2015-10-16
 */
define('IN_DOUCO', true);
require dirname(__FILE__) . '/include/init.php';
// rec操作项的初始化
$rec = $check->is_letter($_REQUEST['rec']) ? $_REQUEST['rec'] : 'default';
// 赋值给模板-meta和title信息
$smarty->assign('page_title', $dou->page_title('catalog'));
$smarty->assign('keywords', $_LANG['catalog']);
$smarty->assign('description', $_LANG['catalog']);
// 赋值给模板-导航栏
$smarty->assign('nav_top_list', $dou->get_nav('top'));
$smarty->assign('nav_middle_list', $dou->get_nav('middle'));
$smarty->assign('nav_bottom_list', $dou->get_nav('bottom'));
// 赋值给模板-数据
$smarty->assign('catalog', get_catalog());
$smarty->assign('head', $dou->head($_LANG['catalog']));
$smarty->display('catalog.dwt');
/**
 * +----------------------------------------------------------
 * 获取整站目录数据
 * +----------------------------------------------------------
 */
function get_catalog()
{
    // 单页面列表
    foreach ($GLOBALS['dou']->get_page_nolevel() as $row) {
        $catalog[] = array("name" => $row['page_name'], "mark" => '-' . $row['mark'], "url" => $row['url']);
    }
    // 栏目模块
    foreach ($GLOBALS['_MODULE']['column'] as $module_id) {
Example #2
0
|                                                                             |
+-----------------------------------------------------------------------------+
$Id$
*/
include_once "Catalog/catalog.php";
?>

<html>
<head>
<title>Product Page</title>
</head>
<body>
<?php 
$product_code = $_GET['product_code'];
// obtained from the URL
$catalog = get_catalog();
$product = $catalog["item[itemId={$product_code}]"];
echo "<b>" . $product->description . "</b><br/>";
echo "(Imagine a compelling picture here)<br/>";
print "</b><br/>";
print "Click on Add to Cart to buy.";
?>


<p>
<a href="welcome.php">Home</a>
<p>
<?php 
echo '<a href="view_cart.php?add=' . $product_code . '">Add to Cart</a>';
?>
  
Example #3
0
function do_meta_triggers($reply, &$mdb2, $table_schema = null, $table_name = null)
{
    $catalog = get_catalog($reply, &$mdb2);
    $res = $mdb2->manager->listTableTriggers($table_name);
    handle_pear_error($res, $reply);
    $node = $reply->addChild("gda_array", null);
    $col = 0;
    declare_column($node, $col++, "trigger_catalog", "string", false);
    declare_column($node, $col++, "trigger_schema", "string", false);
    declare_column($node, $col++, "trigger_name", "string", false);
    declare_column($node, $col++, "event_manipulation", "string", false);
    declare_column($node, $col++, "event_object_catalog", "string", false);
    declare_column($node, $col++, "event_object_schema", "string", false);
    declare_column($node, $col++, "event_object_table", "string", false);
    declare_column($node, $col++, "action_statement", "string", true);
    declare_column($node, $col++, "action_orientation", "string", false);
    declare_column($node, $col++, "condition_timing", "string", false);
    declare_column($node, $col++, "trigger_comments", "string", true);
    declare_column($node, $col++, "trigger_short_name", "string", false);
    declare_column($node, $col++, "trigger_full_name", "string", false);
    $data = $node->addChild("gda_array_data", null);
    foreach ($res as $i => $value) {
        $tdef = $mdb2->reverse->getTriggerDefinition($value);
        if (PEAR::isError($constraints)) {
            continue;
        }
        print_r($tdef);
        $xmlrow = $data->addChild("gda_array_row", null);
        add_value_child($xmlrow, $catalog);
        add_value_child($xmlrow, $catalog);
        add_value_child($xmlrow, $value);
        add_value_child($xmlrow, $tdef["trigger_event"]);
        add_value_child($xmlrow, $catalog);
        add_value_child($xmlrow, $catalog);
        add_value_child($xmlrow, $tdef["table_name"]);
        add_value_child($xmlrow, $tdef["trigger_body"]);
        add_value_child($xmlrow, "ROW");
        /* FIXME */
        add_value_child($xmlrow, $tdef["trigger_type"]);
        add_value_child($xmlrow, $tdef["trigger_comment"]);
        add_value_child($xmlrow, $value);
        add_value_child($xmlrow, $catalog . "." . $value);
    }
}