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


PHP String::unformat_array方法代码示例

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


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

示例1: unformat_array

 static function unformat_array($array)
 {
     while (list($key, $value) = each($array)) {
         if (is_array($array[$key])) {
             $array[$key] = String::unformat_array($array[$key]);
         } else {
             $array[$key] = String::unformat($array[$key]);
         }
     }
     return $array;
 }
开发者ID:askovorodka,项目名称:sqc,代码行数:11,代码来源:class.string.php

示例2: isset

        $smarty->assign("message", $message);
        $template = 'guestbook.a_edit_message.html';
        $template_mode = 'single';
        break;
    case $action == 'edit_msg' && isset($_GET['id']):
        $id = $_GET['id'];
        $navigation[] = array("url" => BASE_URL . "/admin/?mod=guestbook", "title" => '–едактировать сообщение');
        $guestbook = $db->get_single("SELECT * FROM fw_guestbook WHERE id='{$id}'");
        $guestbook = String::unformat_array($guestbook);
        $smarty->assign("guestbook", $guestbook);
        $smarty->assign("mode", "edit");
        $template = 'guestbook.a_edit.html';
        break;
    default:
        if (isset($_GET['page'])) {
            $page = $_GET['page'];
        } else {
            $page = 1;
        }
        $result = $db->query("SELECT COUNT(*) FROM fw_guestbook");
        $pager = Common::pager($result, GB_MESSAGES_PER_PAGE, $page);
        $smarty->assign("total_pages", $pager['total_pages']);
        $smarty->assign("current_page", $pager['current_page']);
        $smarty->assign("pages", $pager['pages']);
        $guestbook_list = $db->get_all("SELECT * FROM fw_guestbook ORDER BY insert_date DESC LIMIT " . $pager['limit']);
        $guestbook_list = String::unformat_array($guestbook_list);
        if (count($guestbook_list) > 0) {
            $smarty->assign("guestbook_list", $guestbook_list);
        }
        break;
}
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:guestbook.a_main.php

示例3: COUNT

     $page_found = true;
     $profile = $db->get_single("SELECT *,(SELECT COUNT(*) FROM fw_orders WHERE user=u.id) AS orders FROM fw_users u WHERE u.id='" . $_SESSION['fw_user']['id'] . "'");
     $profile = String::unformat_array($profile, 'front');
     $orders_list = $db->get_all("SELECT a.id,a.user,a.insert_date,a.status,\n\t\t\t\t\t\t\t\t\tb.product_id,b.order_id,b.product_count,\n\t\t\t\t\t\t\t\t\tc.name,c.small_description,c.price,c.article FROM fw_products\n\t\t\t\t\t\t\t\t\tas c INNER JOIN (fw_orders as a INNER JOIN fw_orders_products as b\n\t\t\t\t\t\t\t\t\tON b.order_id=a.id) ON c.id=b.product_id\n\t\t\t\t\t\t\t\t\tWHERE a.user='" . $_SESSION['fw_user']['id'] . "'");
     $search = array("'<FONT[^>]*?>'", "'</FONT>'", "'<font[^>]*?>'", "'</font>'");
     $replace = new Replace();
     if (count($orders_list)) {
         foreach ($orders_list as $key => $val) {
             $price = $orders_list[$key]['price'];
             $orders_list[$key]['price'] = number_format($orders_list[$key]['price'] * $cur_admin['kurs'] / $cur_site['kurs'], 2);
             $orders_list[$key]['price2'] = number_format($price * $cur_admin['kurs'] / $cur_site2['kurs'], 2);
             $orders_list[$key]['small_description'] = $replace->getReplace($search, "", $orders_list[$key]['small_description']);
         }
     }
     if (count($orders_list) > 0) {
         $orders_list = String::unformat_array($orders_list, 'front');
         $smarty->assign("orders_list", $orders_list);
     }
     $template = 'cabinet_orders.html';
     break;
 default:
     $userId = $check_auth = Common::check_auth_shop('user');
     $user = $users->get_user($userId);
     if (count($url) == 1) {
         $page_found = true;
     }
     $orders = $shop->getUserOrders($userId);
     $smarty->assign("profile", $user);
     $smarty->assign("orders", $orders);
     $main = $smarty->fetch($templates_path . '/cabinet_main_new.html');
     $smarty->assign("main", $main);
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:cabinet.f_main.php

示例4: unset

    $main_template = BASE_PATH . '/templates/404.html';
    //$navigation[]=array("url"=>"/","title"=>"пїЅпїЅпїЅпїЅпїЅпїЅ 404. пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ");
}
$temp = '';
//print_r($navigation);
for ($i = 0; $i < count($navigation); $i++) {
    $_SESSION['nav'][$i] = $navigation[$i]['title'];
    $temp .= $navigation[$i]['url'] . "/";
    $navigation[$i]['url'] = $temp;
}
//костыль
if (count($navigation) > 1) {
    unset($navigation[count($navigation) - 1]);
}
//print_r($navigation);
$navigation = String::unformat_array($navigation, 'front');
$smarty->assign("navigation", $navigation);
$smarty->assign("base_url", BASE_URL);
$smarty->assign("template", $template);
if (isset($css)) {
    $smarty->assign("css", $css);
}
if (isset($js)) {
    $smarty->assign("js", $js);
}
$smarty->assign("db_connections", $_SESSION['db_connections']);
$smarty->assign("pgt", $pgt);
if (isset($page) or $set_pages_url) {
    $current_url = implode("/", $current_url_pages);
    $current_url = preg_replace("/&sort=([a-z]+)/i", "", $current_url);
    $current_url = preg_replace("/&order=([a-z]+)/i", "", $current_url);
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:index.php

示例5: unset

 case $action == 'edit_post':
     $id = $_GET['post_id'];
     $post = $db->get_single("SELECT text,id,author,parent,\n\t\t\t\t\t\t\t\t\t\t\t\t\t(SELECT title FROM fw_forum_threads WHERE id=p.parent) AS title,\n\t\t\t\t\t\t\t\t\t\t\t\t\t(SELECT id FROM fw_forum_threads WHERE id=p.parent) AS thread_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t(SELECT parent FROM fw_forum_threads WHERE id=p.parent) AS thread_parent\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM fw_forum_posts p WHERE p.id='{$id}'");
     if ($_SESSION['fw_user']['id'] != $post['author']) {
         Common::check_priv("{$priv}");
     } else {
         $smarty->assign("no_move", true);
     }
     if ($_GET['is_thread'] == 'yes') {
         $smarty->assign("is_thread", 'yes');
         $forums_list = Common::get_nodes_list($forums_list);
         unset($forums_list[0]);
         $smarty->assign("forums_list", $forums_list);
     }
     $post['text'] = add_forum_tags($post['text']);
     $post = String::unformat_array($post);
     $smarty->assign("post", $post);
     $template = 'forum.a_edit_post.html';
     $template_mode = 'single';
     break;
 case $action == 'create_new_thread':
     $id = $_GET['post_id'];
     $smarty->assign("forums_list", Common::get_nodes_list($forums_list));
     $smarty->assign("post_id", $id);
     $template = 'forum.a_create_thread.html';
     $template_mode = 'single';
     break;
 case $action == 'move_post' && isset($_GET['forum_id']):
     $id = $_GET['post_id'];
     $forum_id = $_GET['forum_id'];
     if (isset($_GET['page']) && $_GET['page'] != '') {
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:forum.a_main.php

示例6: array

    case $action == 'add':
        $navigation[] = array("url" => BASE_URL . "/admin/?mod=otr&action=add", "title" => 'ƒобавить решение');
        $smarty->assign("mode", "add");
        $template = 'otr.a_edit.html';
        break;
    case $action == 'edit' && isset($_GET['id']):
        $id = $_GET['id'];
        $navigation[] = array("url" => BASE_URL . "/admin/?mod=otr", "title" => '–едактировать решение');
        $otr = $db->get_single("SELECT * FROM fw_otr WHERE id='{$id}'");
        $otr = String::unformat_array($otr);
        $smarty->assign("otr", $otr);
        $smarty->assign("mode", "edit");
        $template = 'otr.a_edit.html';
        break;
    default:
        if (isset($_GET['page'])) {
            $page = $_GET['page'];
        } else {
            $page = 1;
        }
        $result = $db->query("SELECT COUNT(*) FROM fw_otr");
        $pager = Common::pager($result, OTR_PER_PAGE, $page);
        $smarty->assign("total_pages", $pager['total_pages']);
        $smarty->assign("current_page", $pager['current_page']);
        $smarty->assign("pages", $pager['pages']);
        $otr_list = $db->get_all("SELECT * FROM fw_otr ORDER BY title ASC LIMIT " . $pager['limit']);
        $otr_list = String::unformat_array($otr_list);
        if (count($otr_list) > 0) {
            $smarty->assign("otr_list", $otr_list);
        }
}
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:otr.a_main.php

示例7: unset

     unset($url[$n]);
     unset($current_url_pages[count($current_url_pages) - 1]);
     $n = count($url) - 1;
     $smarty->assign("type", $type);
 } else {
     unset($type);
 }
 if (isset($type) && $type == 'all') {
     unset($type);
 }
 $cur_site = $db->get_single("SELECT kurs,znak FROM fw_currency WHERE id=" . CURRENCY_SITE);
 $cur_site = String::unformat_array($cur_site);
 $cur_site2 = $db->get_single("SELECT kurs,znak FROM fw_currency WHERE id=" . CURRENCY_SITE2);
 $cur_site2 = String::unformat_array($cur_site2);
 $cur_admin = $db->get_single("SELECT kurs,znak FROM fw_currency WHERE id=" . CURRENCY_ADMIN);
 $cur_admin = String::unformat_array($cur_admin);
 $smarty->assign("currency_site", $cur_site);
 $smarty->assign("currency_site2", $cur_site2);
 $shop = new Shop($db);
 /*-----------------РАЗЛИЧНЫЕ ДЕЙСТВИЯ-----------------*/
 if (isset($_POST['submit_rating'])) {
     $id = $_POST['id'];
     $comment = String::secure_user_input($_POST['nm_text']);
     $comment = Common::strip_forum_tags($comment);
     $author = $_SESSION['fw_user']['id'];
     if ($comment != '') {
         $db->query("INSERT INTO fw_products_comments(product_id,author,text,insert_date) VALUES('{$id}','{$author}','{$comment}','" . time() . "')");
     }
     if (isset($_POST['rating'])) {
         $rating = $_POST['rating'];
         $check_rating = explode(",", $_COOKIE['fw_rating']);
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:shop.f_main.php

示例8: COUNT

<?php

$cur_site = $db->get_single("SELECT kurs,znak FROM fw_currency WHERE id=" . CURRENCY_SITE);
$cur_site = String::unformat_array($cur_site);
$smarty->assign("currency_site", $cur_site);
$cur_admin = $db->get_single("SELECT kurs,znak FROM fw_currency WHERE id=" . CURRENCY_ADMIN);
$cur_admin = String::unformat_array($cur_admin);
$count_cat = $db->get_single("SELECT COUNT(*) AS count FROM fw_tree");
$count_documents = $db->get_single("SELECT COUNT(*) AS count FROM fw_tree WHERE module='page'");
$count_users = $db->get_single("SELECT COUNT(*) AS count FROM fw_users");
$last_orders = $db->get_all("SELECT a.id,a.user,\n\t\t\t\t\t\t\t a.insert_date as order_date,\n\t\t\t\t\t\t\t (SELECT login FROM fw_users as b WHERE b.id=a.user) as user_name,\n\t\t\t\t\t\t\t (SELECT SUM((SELECT price FROM fw_products WHERE id=c.product_id) * c.product_count) \n\t\t\t\t\t\t\t FROM fw_orders_products as c WHERE c.order_id=a.id) as total_summ \n\t\t\t\t\t\t\t FROM fw_orders as a ORDER BY a.insert_date LIMIT 0,5");
$last_orders = String::unformat_array($last_orders);
if (count($last_orders) > 0) {
    for ($i = 0; $i < count($last_orders); $i++) {
        $last_orders[$i]['total_summ'] = number_format($last_orders[$i]['total_summ'] * $cur_admin['kurs'] / $cur_site['kurs'], 2);
    }
}
$last_faq = $db->get_all("SELECT a.id,a.author, a.insert_date as insert_date,a.message FROM fw_guestbook as a ORDER BY insert_date LIMIT 0,5");
$last_faq = String::unformat_array($last_faq);
$forum_enabled = $db->get_single("SELECT id FROM fw_modules WHERE name='forum'");
if (strlen(trim($forum_enabled['id'])) > 0) {
    $last_forum = $db->get_all("SELECT a.id, a.parent, a.author, a.publish_date, a.publish_date as date, a.text, b.id as thread_id, b.parent, b.title,\n\t\t\t\t\t\t\tc.url, c.name\n\t\t\t\t\t\t\tFROM fw_forum_posts as a INNER JOIN (fw_forum_threads as b INNER JOIN fw_forums as c ON b.parent=c.id) ON a.parent=b.id WHERE a.status='1' ORDER BY a.publish_date LIMIT 0,5");
    $last_forum = String::unformat_array($last_forum);
    $smarty->assign("last_forum", $last_forum);
}
$smarty->assign("last_orders", $last_orders);
$smarty->assign("last_faq", $last_faq);
$smarty->assign("count_cat", $count_cat['count']);
$smarty->assign("count_documents", $count_documents['count']);
$smarty->assign("count_users", $count_users['count']);
开发者ID:askovorodka,项目名称:sqc,代码行数:30,代码来源:main.php

示例9: array

    case $action == 'add':
        $navigation[] = array("url" => BASE_URL . "/admin/?mod=questions&action=add", "title" => 'ƒобавить вопрос');
        $smarty->assign("mode", "add");
        $template = 'questions.a_edit.html';
        break;
    case $action == 'edit' && isset($_GET['id']):
        $id = $_GET['id'];
        $navigation[] = array("url" => BASE_URL . "/admin/?mod=questions", "title" => '–едактировать вопрос');
        $questions = $db->get_single("SELECT * FROM fw_questions WHERE id='{$id}'");
        $questions = String::unformat_array($questions);
        $smarty->assign("questions", $questions);
        $smarty->assign("mode", "edit");
        $template = 'questions.a_edit.html';
        break;
    default:
        if (isset($_GET['page'])) {
            $page = $_GET['page'];
        } else {
            $page = 1;
        }
        $result = $db->query("SELECT COUNT(*) FROM fw_questions");
        $pager = Common::pager($result, 10, $page);
        $smarty->assign("total_pages", $pager['total_pages']);
        $smarty->assign("current_page", $pager['current_page']);
        $smarty->assign("pages", $pager['pages']);
        $questions_list = $db->get_all("SELECT *, (SELECT count(id) FROM fw_answers WHERE question_id=fw_questions.id) as count_answers FROM fw_questions ORDER BY id DESC LIMIT " . $pager['limit']);
        $questions_list = String::unformat_array($questions_list);
        if (count($questions_list) > 0) {
            $smarty->assign("questions_list", $questions_list);
        }
}
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:questions.a_main.php

示例10: COUNT

     }
     if (isset($_GET['cat'])) {
         if (isset($_SESSION['fw_product_added']) && $_SESSION['fw_product_added'] == '1') {
             $_SESSION['fw_product_added'] = '0';
             $smarty->assign("product_added", '1');
         }
         if (isset($_GET['page'])) {
             $page = $_GET['page'];
         } else {
             $page = 1;
         }
         $result = $db->query("SELECT COUNT(*) FROM fw_products");
         $pager = Common::pager($result, PRODUCTS_PER_PAGE, $page);
         $cat = $_GET['cat'];
         $products_list = $db->get_all("SELECT * FROM fw_products WHERE parent='{$cat}' AND status='1' LIMIT " . $pager['limit']);
         $products_list = String::unformat_array($products_list);
         $smarty->assign("products_list", $products_list);
         $smarty->assign("cat", $cat);
         $smarty->assign("total_pages", $pager['total_pages']);
         $smarty->assign("current_page", $pager['current_page']);
         $smarty->assign("pages", $pager['pages']);
     } else {
         $smarty->assign("cat_list", $cat_list);
     }
     $template = 'mini_catalogue.html';
     $template_mode = 'single';
     break;
 case $action == 'delete_additional_product' && isset($_GET['id']) & isset($_GET['from']):
     $id = $_GET['id'];
     $from = $_GET['from'];
     $product = $db->get_single("SELECT additional_products FROM fw_products WHERE id='{$from}'");
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:regions.a_main.php

示例11: intval

        if (isset($_GET['parent'])) {
            $parent = intval($_GET['parent']);
            $smarty->assign("parent", $parent);
            $template = "tree.a_edit_document.html";
            $smarty->assign("mode", "add");
            $nodes_list = Common::get_nodes_list($nodes_list, 'page');
            unset($nodes_list[0]);
            $smarty->assign("nodes_list", $nodes_list);
        }
        break;
    case $action == 'edit_document':
        $navigation[] = array("url" => BASE_URL . "/admin/?mod=tree&action=edit_document", "title" => 'Редактировать документ');
        if (isset($_GET['id'])) {
            $id = intval($_GET['id']);
            $result = $db->get_single("SELECT * FROM fw_documents WHERE id='" . $id . "'");
            if (count($result) > 0) {
                $template = "tree.a_edit_document.html";
                $smarty->assign("parent", $result['parent']);
                $smarty->assign("mode", "edit");
                $smarty->assign("document", $result);
                $nodes_list = Common::get_nodes_list($nodes_list, 'page');
                unset($nodes_list[0]);
                $smarty->assign("nodes_list", $nodes_list);
            }
        }
        break;
    default:
        $content = $db->get_all("\n      SELECT\n        *,\n        (SELECT COUNT(id) FROM fw_documents WHERE parent=t.id) as documents\n      FROM fw_tree t\n      ORDER BY t.param_left ASC\n    ");
        $content = String::unformat_array($content);
        $smarty->assign("content", Common::get_nodes_list($content));
}
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:tree.a_main.php

示例12: isset

    case $action == 'edit' && isset($_GET['id']):
        $id = $_GET['id'];
        $navigation[] = array("url" => BASE_URL . "/admin/?mod=news", "title" => 'Редактировать новость');
        $news = $db->get_single("SELECT * FROM fw_news WHERE id='{$id}'");
        $news = String::unformat_array($news);
        $smarty->assign("news", $news);
        $smarty->assign("mode", "edit");
        $template = 'news.a_edit.html';
        break;
    default:
        if (isset($_GET['page'])) {
            $page = $_GET['page'];
        } else {
            $page = 1;
        }
        if (isset($_GET['year']) && intval($_GET['year']) > 0) {
            $cond = " WHERE YEAR(FROM_UNIXTIME(publish_date))='" . $_GET['year'] . "' ";
        } else {
            $cond = "";
        }
        $result = $db->query("SELECT COUNT(*) FROM fw_news {$cond}");
        $pager = Common::pager($result, NEWS_PER_PAGE, $page);
        $smarty->assign("total_pages", $pager['total_pages']);
        $smarty->assign("current_page", $pager['current_page']);
        $smarty->assign("pages", $pager['pages']);
        $news_list = $db->get_all("SELECT * FROM fw_news {$cond} ORDER BY publish_date DESC LIMIT " . $pager['limit']);
        $news_list = String::unformat_array($news_list);
        if (count($news_list) > 0) {
            $smarty->assign("news_list", $news_list);
        }
}
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:news.a_main.php

示例13: count

     $smarty->assign("current_page", $pager['current_page']);
     $smarty->assign("pages", $pager['pages']);
     $smarty->assign("total_photos", count($photos_list));
     $smarty->assign("photos_list", String::unformat_array($photos_list, 'front'));
     $smarty->assign("album_id", $album_id);
     $mode = 'album';
 } else {
     if (isset($_GET['page']) && $_GET['page'] != '') {
         $page = $_GET['page'];
     } else {
         $page = 1;
     }
     $result = $db->query("SELECT COUNT(*) FROM fw_photoalbums");
     $pager = Common::pager($result, ALBUMS_PER_PAGE, $page);
     $albums_list = $db->get_all("SELECT *,(SELECT COUNT(*) FROM fw_photoalbum_images WHERE parent=a.id) AS photos FROM fw_photoalbums a LIMIT " . $pager['limit']);
     $albums_list = String::unformat_array($albums_list);
     $cl = Common::get_nodes_list($cat_list);
     for ($i = 0; $i < count($albums_list); $i++) {
         for ($k = 0; $k < count($cl); $k++) {
             if ($albums_list[$i]['parent'] == $cl[$k]['id']) {
                 $albums_list[$i]['cat_title'] = $cl[$k]['full_title'];
                 break;
             }
         }
     }
     $smarty->assign("total_pages", $pager['total_pages']);
     $smarty->assign("cat_list", $cl);
     $smarty->assign("current_page", $pager['current_page']);
     $smarty->assign("pages", $pager['pages']);
     $smarty->assign("albums_list", $albums_list);
     $mode = 'albums_list';
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:photoalbum.a_main.php

示例14: array

     $navigation[] = array("url" => BASE_URL . "/admin/?mod=subscribe&action=templates", "title" => 'Шаблоны писем');
     $smarty->assign("templates_list", $db->get_all("SELECT id,name FROM fw_subscribe_templates"));
     $template = 'subscribe.a_templates.html';
     break;
 case $action == 'add_template':
     $navigation[] = array("url" => BASE_URL . "/admin/?mod=subscribe&action=templates", "title" => 'Шаблоны писем');
     $navigation[] = array("url" => BASE_URL . "/admin/?mod=subscribe&action=add_template", "title" => 'Добавить шаблон');
     $smarty->assign("mode", "add");
     $template = 'subscribe.a_edit_template.html';
     break;
 case $action == 'edit_template':
     $navigation[] = array("url" => BASE_URL . "/admin/?mod=subscribe&action=templates", "title" => 'Шаблоны писем');
     $navigation[] = array("url" => BASE_URL . "/admin/?mod=subscribe&action=edit_template", "title" => 'Редактировать шаблон');
     $id = $_GET['id'];
     $t = $db->get_single("SELECT * FROM fw_subscribe_templates WHERE id='{$id}'");
     $smarty->assign("t", String::unformat_array($t));
     $smarty->assign("mode", "edit");
     $template = 'subscribe.a_edit_template.html';
     break;
 case $action == 'users':
     $navigation[] = array("url" => BASE_URL . "/admin/?mod=subscribe&action=users", "title" => 'Подписчики');
     if (isset($_GET['page'])) {
         $page = $_GET['page'];
     } else {
         $page = 1;
     }
     $result = $db->query("SELECT COUNT(*) FROM fw_subscribe_list");
     $pager = Common::pager($result, 50, $page);
     $smarty->assign("total_pages", $pager['total_pages']);
     $smarty->assign("current_page", $pager['current_page']);
     $smarty->assign("pages", $pager['pages']);
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:subscribe.a_main.php

示例15: array

     $navigation[] = array("url" => BASE_URL . "/admin/?mod=shop&action=currency", "title" => 'Курсы валют');
     $cur_list = $db->get_all("SELECT * FROM fw_currency");
     $cur_list = String::unformat_array($cur_list);
     $smarty->assign("cur_list", $cur_list);
     $template = 'shop.a_cur_list.html';
     break;
 case $action == 'add_cur':
     $navigation[] = array("url" => BASE_URL . "/admin/?mod=shop", "title" => 'Курс валют');
     $smarty->assign("mode", "add");
     $template = 'shop.a_cur_edit.html';
     break;
 case $action == 'edit_cur' && isset($_GET['id']):
     $navigation[] = array("url" => BASE_URL . "/admin/?mod=shop", "title" => 'Редактирование валюты');
     $id = $_GET['id'];
     $cur = $db->get_single("SELECT * FROM fw_currency WHERE id='{$id}'");
     $cur = String::unformat_array($cur);
     $smarty->assign("mode", "edit");
     $smarty->assign("cur", $cur);
     $template = 'shop.a_cur_edit.html';
     break;
 default:
     $count_cat = $db->get_single("SELECT COUNT(*) AS count FROM fw_catalogue");
     $count_products = $db->get_single("SELECT COUNT(*) AS count FROM fw_products");
     $count_orders = $db->get_single("SELECT COUNT(*) AS count FROM fw_orders");
     $total_price = $db->get_single("SELECT SUM(total_price) AS total FROM fw_orders");
     if ($total_price['total'] == '') {
         $total_price = '0.00';
     } else {
         $total_price = $total_price['total'];
     }
     $smarty->assign("count_cat", $count_cat['count']);
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:shop.a_main.php


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