示例#1
0
    public static function formValidator($formObj, $errBox = "sbl_errmsg")
    {
        $include = <<<INC
<script type="text/javascript" src="%s" charset="UTF-8"></script>
INC;
        $model = $formObj->getModel();
        $columns = $model->getColumns();
        $errMsgs = Sabel_Db_Validate_Config::getMessages();
        $lNames = Sabel_Db_Model_Localize::getColumnNames($model->getName());
        $data = array("data" => array(), "errors" => $errMsgs);
        foreach ($columns as $c) {
            $name = $c->name;
            if (isset($lNames[$c->name])) {
                $c->name = $lNames[$c->name];
            }
            $data["data"][$name] = array_change_key_case((array) $c, CASE_UPPER);
        }
        $buf = array();
        $buf[] = sprintf($include, linkto("js/helpers/FormValidator.js"));
        $buf[] = "\n";
        $buf[] = '<script type="text/javascript">';
        $buf[] = 'new Sabel.PHP.FormValidator(' . json_encode($data) . ');';
        $buf[] = '</script>';
        return join($buf, "") . "\n";
    }
function term_atom_entry($term, $details)
{
    global $config;
    $link = $config['base_url'] . linkto("posts.php", array(), array("term" => $term));
    $posts = implode(",", $details["posts"]);
    $return .= "\n<entry>\n\t<title>{$term}</title>\n\t<link>{$link}</link>\n\t<content>{$posts}</content>\n</entry>\n";
    return $return;
}
示例#3
0
 /**
  * @httpMethod post
  *
  * @check_client_id
  */
 public function update()
 {
     $user = $this->aclUser;
     $result = $this->getLogic("status")->post($user->id, $this->comment);
     if ($this->isAjaxRequest()) {
         if ($result->isSuccess()) {
             $this->ajax->values = array("id" => $result->aStatus->id, "name" => $user->name, "comment" => showComment($result->aStatus->comment), "updated" => showUpdatedAt($result->aStatus->created_at), "user_home" => uri("n: users, c: {$user->name}, a: "), "image_uri" => user_avatarize($user->id), "status_uri" => uri("c: index, a: status, param: {$result->aStatus->id}"), "trash_gif" => linkto("images/trash.gif"), "reply_gif" => linkto("images/reply.gif"));
         } else {
             $this->ajax->failure();
         }
     } else {
         $this->redirect->to("n: default, c: user, a: home");
     }
 }
示例#4
0
文件: Js.php 项目: reoring/sabel
    public static function ajaxPager($replaceId, $pagerClass = "sbl_pager")
    {
        $include = <<<INC
<script type="text/javascript" src="%s" charset="UTF-8"></script>
INC;
        $buf = array();
        $buf[] = sprintf($include, linkto("js/helpers/EffectUpdater.js"));
        $buf[] = sprintf($include, linkto("js/helpers/AjaxPager.js"));
        $buf[] = "\n";
        $buf[] = '<script type="text/javascript">';
        $buf[] = sprintf('new Sabel.Event(window, "load", function() { new Sabel.PHP.AjaxPager("%s", "%s"); });', $replaceId, $pagerClass);
        $buf[] = '</script>';
        return join($buf, "") . "\n";
    }
示例#5
0
}
# pagination control
if ($posts) {
    if ($every_category_rows > $this_category_rows) {
        # if we got rid of the category restriction then we could show more posts...
        if ($every_category_rows >= 2) {
            $all_posts_end = "<b>" . $every_category_rows . "</b> posts";
        } else {
            $all_posts_end = "<b>one</b> post";
        }
        if ($this_category_rows >= 2) {
            $posts_end = "are <b>" . $this_category_rows . "</b> posts";
        } else {
            $posts_end = "is <b>one</b> post";
        }
        printf("\n<div class='message'>\nThere %s in the %s category containing this term and %s in all categories - <a href='%s'>click here</a> to see them too.\n</div>", $posts_end, $safe_category, $all_posts_end, linkto("posts.php", $page_vars, array("category" => false)));
    }
    print_pagination($posts, $safe_skip, "posts.php", $GLOBALS["config"]['posts_per_page']);
    foreach ($posts as $post) {
        $display_filters = array("image" => true);
        if ($filters['conference']) {
            $display_filters["display_geotags"] = true;
        }
        print_post($post, $display_filters);
    }
    print_pagination($posts, $safe_skip, "posts.php", $GLOBALS["config"]['posts_per_page']);
} else {
    print "No posts found.";
}
?>
</div>
示例#6
0
        $vip_m = $conn->GetRow("select * from " . PREFIX . "data_list where type='memberdesh' and new_type='vip' and status=1");
        if ($vip_m) {
            if ($check_total >= $vip_m['memo'] * 1 && $vip_m['memo'] * 1 > 0) {
                $indata["type"] = $vip_m['new_type'];
                $indata["mode_time"] = date('Y-m-d H:i:s', strtotime('+1 year'));
            } else {
                $indata['type'] = 'member';
            }
            $member->update($indata);
        }
    }
}
//--刪除
if ($_GET["del"] && $_GET["del"] != '') {
    if ($shopping_car->car_remove($_GET["del"])) {
        linkto('?list=1');
    }
}
//--付款
if ($_GET["payorder"]) {
    $pay_bill = $shopping_car->getorder(" where id='" . $_GET["payorder"] . "'");
    if ($pay_bill["pay_status"] != '1') {
        $temp = $shopping_car->esun_pay_send($pay_bill, '回傳路由');
    } else {
        alert('此筆交易已經成功付款了,無需再次付款!!', -1);
        exit;
    }
}
//--商品退貨
if ($_GET["back_item"]) {
    if ($shopping_car->back_item($_GET["back_item"])) {
示例#7
0
if ($total_results) {
    print "<h1>Searched for " . $safe_search;
    if ($safe_type != "any") {
        print " in {$safe_type}</h1>";
        if ($total_results > $num_results) {
            print " (<a href='search.php?search=" . $_GET['search'] . "&type=any'>remove this limit</a> to see " . ($total_results - $num_results) . " more results)";
        }
    } else {
        print "</h1>";
    }
    # search for any tags
    $tags = get_similar_tags($safe_search, 12, 1);
    if ($tags) {
        print "<div class='tagbox'>Items tagged <a href='" . linkto("tag_search.php", $GLOBALS['page_vars'], array("tag" => $safe_search)) . "'>{$safe_search}</a> were also tagged: ";
        foreach ($tags as $tag => $val) {
            print "<a href='" . linkto("tag_search.php", $GLOBALS['page_vars'], array("tag" => $tag)) . "'>{$tag}</a> ";
        }
        print "</div>";
    }
    if ($num_results) {
        print_pagination($num_results, $safe_skip, "search.php", $GLOBALS["config"]['posts_per_page'], array("search" => $safe_search, "type" => $safe_type));
        foreach ($blogs as $blog) {
            print_blog($blog);
        }
        foreach ($papers as $paper) {
            print_paper($paper, array("display" => "minimal"));
        }
        foreach ($posts as $post) {
            print_post($post, array("image" => true));
        }
        print_pagination($num_results, $safe_skip, "search.php", $GLOBALS["config"]['posts_per_page'], array("search" => $safe_search, "type" => $safe_type));
示例#8
0
    print "class='selected'";
}
?>
>date added</a>
or <a href='<?php 
plinkto("links.php", $page_vars, array("order_by" => "cited"));
?>
' <?php 
if ($safe_order_by == "cited") {
    print "class='selected'";
}
?>
>popularity</a>
<?php 
if ($safe_journal) {
    print " limiting to results from <b>{$safe_journal}</b> (<a href='" . linkto("papers.php", $page_vars, array("journal" => false)) . "'>remove limit</a>)";
}
?>
<p>And only show items linked to..<br/>
<p>by at least 
<a <?php 
if ($safe_min_links == 1) {
    print "class='selected'";
}
?>
 href='<?php 
plinkto("links.php", $page_vars, array("min_links" => 1));
?>
'>1</a>, 
<a <?php 
if ($safe_min_links == 2) {
function print_blog($blog, $filters = array())
{
    global $page_vars;
    if (!$blog['active']) {
        print "<div class='blogbox blogbox_inactive'>";
        print "<div class='blogbox_title'>";
        print "<a href='" . linkto("blog_search.php", $page_vars, array("blog_id" => $blog['blog_id'])) . "'>" . $blog['title'] . "</a>";
        print "</div>";
        print "<p><i>This blog is inactive - it is no longer aggregated. <a href='" . linkto("manage_blogs.php", array(), array("workspace" => $filters['workspace'], "restore_blog_id" => $blog['blog_id'])) . "'>Click here</a> to restore it.</i>";
        print "</div>";
        return;
    }
    print "<div class='blogbox'>";
    // title
    print "<div class='blogbox_title'>";
    if ($filters['link']) {
        print "<a href='" . $blog['url'] . "'>" . $blog['title'] . "</a>";
    } else {
        print "<a href='" . linkto("blog_search.php", $page_vars, array("blog_id" => $blog['blog_id'])) . "'>" . $blog['title'] . "</a>";
    }
    print "</div>";
    // thumbnail
    if ($blog['image']) {
        print "<div class='blogbox_thumbnail'>";
        print "<img src='" . $blog['image'] . "' align='left'/>";
        print "</div>";
    }
    // byline
    print "<div class='blogbox_byline'>";
    print connotea_link($blog['url']);
    if ($blog['incoming_bloglove']) {
        print print_rating($blog['incoming_bloglove']) . " other blogs recently<br/>";
    }
    print "<a href='" . $blog['feed_url'] . "'>";
    print "<img style='border: 0px;' src='images/feed.png' border='0' align='absmiddle'/> ";
    print "</a>";
    print "<a href='" . $blog['url'] . "'>" . $blog['url'] . "</a>";
    print "</div>";
    // blog description
    print "<div class='blogbox_content'>";
    print "<p>" . strip_tags(html_entity_decode($blog['description']));
    print "</div>";
    print "<div class='blogbox_footer'>&nbsp;</div>";
    $tags_array = get_blog_categories($blog['blog_id']);
    $tags = array();
    if ($filters['add_tag']) {
        # IN THE ADMIN INTERFACE
        print "<p><i>This blog is active - new posts will be aggregated. <a href='" . linkto("manage_blogs.php", array(), array("workspace" => $filters['workspace'], "remove_blog_id" => $blog['blog_id'])) . "'>Click here</a> to delete it.</i>";
        # controls that allow you to add and remove tags
        foreach ($tags_array as $tag) {
            $id = $blog['blog_id'] . ":" . $tag;
            array_push($tags, "<a id='{$id}' onclick='switchClass(this);' class='tag_selected'>{$tag}</a>");
        }
        print "<div class='tagbox'><p>Tags: " . implode(' ', $tags);
        $query = "SELECT DISTINCT tag FROM tags WHERE !ISNULL(blog_id) ORDER BY tag ASC";
        $results = mysql_query($query);
        while ($row = mysql_fetch_assoc($results)) {
            $id = $blog['blog_id'] . ":" . $row['tag'];
            if (!in_array($row['tag'], $tags_array)) {
                if ($safe_category == $row['tag']) {
                    $selected = "selected";
                }
                printf(" <a id='{$id}' onclick='switchClass(this);' class='tag_select'>%s</a>", $row['tag']);
            }
        }
        $id = $blog['blog_id'] . ":custom";
        print "<p>Create a custom tag? <input type='textbox' id='{$id}' onchange='addCustomTag(this);' value=''/>";
        print "</div>";
    } else {
        # NOT IN THE ADMIN INTERFACE
        $tags = array();
        if ($filters['tagcloud']) {
            $popular_tags = get_tags_for_blogs(array($blog['blog_id']), 3);
            foreach ($popular_tags as $key => $val) {
                array_push($tags, "<a href='" . linkto("tag_search.php", $page_vars, array("tag" => $key)) . "'>{$key}</a>");
            }
        }
        foreach ($tags_array as $tag) {
            array_push($tags, "<a href='" . linkto("blogs.php", $page_vars, array("category" => $tag)) . "'>{$tag}</a>");
        }
        print "<div class='tagbox'>" . implode(' ', $tags) . "</div>";
    }
    print "<div class='blogbox_footer'>&nbsp;</div>";
    print "</div>";
}
示例#10
0
        $newsResult = mysqli_query($db, "\r\n\t\t\t\tSELECT *\r\n\t\t\t\tFROM {$dbinfo[pre]}news\r\n\t\t\t\tWHERE active = 1\r\n\t\t\t\tAND add_date < '{$nowGMT}'\r\n\t\t\t\tAND (expire_type = 0 OR expire_date > '{$nowGMT}') \r\n\t\t\t\tORDER BY sortorder,add_date DESC\r\n\t\t\t\t");
        if ($returnRows = mysqli_num_rows($newsResult)) {
            while ($news = mysqli_fetch_assoc($newsResult)) {
                $news['title'] = $news['title_' . $selectedLanguage] ? $news['title_' . $selectedLanguage] : $news['title'];
                // Choose the correct language
                $news['short'] = $news['short_' . $selectedLanguage] ? $news['short_' . $selectedLanguage] : $news['short'];
                // Choose the correct language
                $news['seoTitle'] = cleanForSEO($news['title']);
                // Name cleaned for SEO usage
                $parms['page'] = "news.php?id={$news[news_id]}";
                // Link to page
                if ($modRewrite) {
                    $parms['page'] .= "&seoTitle={$news[seoTitle]}";
                }
                // Link to page with seoName added
                $news['linkto'] = linkto($parms);
                // Create the link using SEO if needed
                $news['display_date'] = $customNewsDate->showdate($news['add_date']);
                // Create a local time and date
                $newsArray[] = $news;
            }
            $smarty->assign('newsRows', $returnRows);
            $smarty->assign('news', $newsArray);
        }
        $smarty->display('news.list.tpl');
        // Smarty template
    }
} catch (Exception $e) {
    echo $e->getMessage();
}
include BASE_PATH . '/assets/includes/debug.php';
示例#11
0
            if ($member->login($_POST["account"], $_POST["password"])) {
                /*先清除原有購物車內容*/
                $shopping_car = new order($conn, PREFIX . "shopping_car", PREFIX . "shopping_car_list", PREFIX . "products");
                $temp_del = $shopping_car->car_list();
                if ($temp_del) {
                    $temp_id_str = '';
                    foreach ($temp_del as $k => $v) {
                        if ($temp_id_str != '') {
                            $temp_id_str .= ',';
                        }
                        $temp_id_str .= $v["shopping_car_list_id"];
                    }
                    $shopping_car->car_remove($temp_id_str);
                }
                if ($_SESSION["login_page"]) {
                    //-判斷有否暫存頁面
                    $temp = $_SESSION["login_page"];
                    unset($_SESSION["login_page"]);
                    linkto($temp);
                } else {
                    linkto("?act=detail");
                }
            } else {
                alert('請確認資料是否正確', -1);
                exit;
            }
        }
        break;
}
$tploutput = $design->load("member_" . $act);
include_once "index.php";
示例#12
0
include "functions.php";
$PAGE_TYPE = "posts";
$PAGE_TITLE = $config["name"] . " - Post details";
include "header.php";
include "posts_menu.php";
$safe_post_id = mysql_escape_string($_GET['post_id']);
$terms = get_terms_for_post($safe_post_id, 100, 2);
if (sizeof($terms)) {
    print "<div class='sidebar'>";
    print "<div class='sidebox'>";
    print "<div class='sidebox_title'>Shared Terms</div>";
    print "<div class='sidebox_content'>";
    print "<p>Click on the terms below to see more posts on that topics.";
    print "<div class='tagcloud'>";
    foreach ($terms as $term) {
        print "<a class='tagcloud_2' href='" . linkto("posts.php", $page_vars, array("term" => $term)) . "'>{$term}</a> ";
    }
    print "</div>";
    print "</div>";
    print "</div>";
    print "</div>";
}
?>
<div class='content <?php 
if (!sizeof($terms)) {
    print "fullwidth";
}
?>
'>
<?php 
$posts = get_posts("added_on", array("post_id" => array($safe_post_id)));
示例#13
0
        $customNewsDate->setMemberSpecificDateInfo();
        $customNewsDate->distime = 0;
        while ($featuredNews = mysqli_fetch_assoc($featuredNewsResult)) {
            $featuredNews['title'] = $featuredNews['title_' . $selectedLanguage] ? $featuredNews['title_' . $selectedLanguage] : $featuredNews['title'];
            // Choose the correct language
            $featuredNews['short'] = $featuredNews['short_' . $selectedLanguage] ? $featuredNews['short_' . $selectedLanguage] : $featuredNews['short'];
            // Choose the correct language
            $featuredNews['seoTitle'] = cleanForSEO($featuredNews['title']);
            // Name cleaned for SEO usage
            $parms['page'] = "news.php?id={$featuredNews[news_id]}";
            // Link to page
            if ($modRewrite) {
                $parms['page'] .= "&seoTitle={$featuredNews[seoTitle]}";
            }
            // Link to page with seoName added
            $featuredNews['linkto'] = linkto($parms);
            // Create the link using SEO if needed
            $featuredNews['display_date'] = $customNewsDate->showdate($featuredNews['add_date']);
            // Create a local time and date
            $featuredNewsArray[] = $featuredNews;
        }
        $smarty->assign('featuredNewsRows', count($featuredNewsArray));
        $smarty->assign('featuredNews', $featuredNewsArray);
    } catch (Exception $e) {
        die(exceptionError($e));
    }
}
/*
 * Get featured homepage prints
 */
if ($config['settings']['hpprints']) {
示例#14
0
                                $blog_tags[$post['blog_id']] .= "|TAG|";
                            }
                            $blog_tags[$post['blog_id']] .= "{$term}";
                            $done[$post['blog_id']] = true;
                        }
                    }
                }
            }
        }
    }
}
arsort($blog_ids, SORT_NUMERIC);
if ($blog_ids) {
    print "<h3>Recommended blogs</h3>";
    foreach ($blog_ids as $blog_id => $weight) {
        print "<div class='blogbox'>";
        print "<div class='blogbox_title'><a href='" . linkto("blog_search.php", $page_vars, array("blog_id" => $blog_id)) . "'>" . $blog_names[$blog_id] . "</a></div>";
        print "<div class='tagbox'>";
        $tags = explode("|TAG|", $blog_tags[$blog_id]);
        foreach ($tags as $tag) {
            print "<a href='" . linkto("tag_search.php", $page_vars, array("tag" => $tag)) . "'>{$tag}</a> ";
        }
        print "</div></div>";
    }
}
?>


</div>
<?php 
include "footer.php";
示例#15
0
        $sql = "select * from " . $member["table"] . " where email='" . quotes($_GET["email"]) . "' and password='******'";
        $data["one"] = $conn->GetRow($sql);
    }
    if ($data["one"]) {
        $member_data = $data["one"];
        $_SESSION["member_info"]["login"] = $data["one"];
        if ($_GET["ajax"] != NULL) {
            echo json_encode($data["one"]);
            exit;
        } else {
            linkto(-1);
            //反回;
        }
    } else {
        //---無資料處理方式
        linkto(-1);
        //反回;
    }
}
if ($_POST) {
    //---------檔案上傳 直接一起寫入post
    foreach ($_FILES as $k => $v) {
        if (is_array($_FILES[$k]["name"])) {
            //---判斷為陣列名稱相同物件上傳
            foreach ($_FILES[$k]["name"] as $n1 => $n2) {
                $temp_file_name = explode('.', $n2);
                $temp_file_name = strtotime(date('Y-m-d H:i:s')) . $k . rand(10, 99) . '.' . $temp_file_name[count($temp_file_name) - 1];
                move_uploaded_file($_FILES[$k]["tmp_name"][$n1], $member["file_url"] . $temp_file_name);
                $_POST[$k][] = $temp_file_name;
            }
        } else {
示例#16
0
</div>
</div>
<div class='frontpage_tab2'>
<div class='tab_padding'>
<?php 
$papers = get_top_papers($safe_category, $last_fortnight);
if ($config['collect_papers'] && sizeof($papers)) {
    print "<div class='tab_title'>Popular books &amp; papers this week</div>";
    foreach ($papers as $paper) {
        print_paper($paper, array("display" => "minimal", "show_byline" => true));
    }
    print "<div class='read_more'><a href='" . linkto("papers.php", $page_vars, array("order_by" => "cited", "timeframe" => "1m")) . "'>read more recently popular papers...</a></div>";
    print "</div>";
} else {
    print "<div class='tab_title'>Popular posts this month</div>";
    $posts = get_top_posts($safe_category, $last_month, 5);
    print "<div class='popular'>";
    foreach ($posts as $post) {
        print_post($post, array("image" => true));
    }
    print "<div class='read_more'><a href='" . linkto("posts.php", $page_vars, array("order_by" => "cited", "timeframe" => "1w")) . "'>read more recently popular posts...</a></div>";
    print "</div>";
}
?>
</div>
</div>
</div>	
<div class='frontpage_footer'>&nbsp;</div>
</div>
<?php 
include "footer.php";
示例#17
0
<?php

$blurb["frontpage"] = sprintf("\n<h1>Welcome to Postgenomic</h1>\n<p>Postgenomic collects data from hundreds of science blogs and then does useful and interesting things with it.\n<p>With Postgenomic, you can:\n<ul>\n<li>Find, read and subscribe to new <a href='%s'>science blogs</a>\n<li>Find out what scientists are saying about the latest <a href='%s'>books</a> and <a href='%s'>papers</a>\n<li>Read <a href='%s'>mini-reviews</a>, <a href='%s'>conference reports</a> or even <a href='%s'>original research</a>\t\n<li>See the buzz surrounding <a href='%s'>different websites</a>\n<li>Browse different subject areas - <a href='%s'>chemistry</a>, <a href='%s'>bioinformatics</a>, <a href='%s'>neuroscience</a>, the <a href='%s'>life sciences</a>... see the 'Explore' options on the top right hand side of the page for more.\n</ul>", linkto("blogs.php", $page_vars), linkto("papers.php", $page_vars, array("area" => "books")), linkto("papers.php", $page_vars), linkto("posts.php", $page_vars, array("tag" => "review")), linkto("posts.php", $page_vars, array("tag" => "conference")), linkto("posts.php", $page_vars, array("tag" => "original_research")), linkto("links.php", $page_vars), linkto("index.php", $page_vars, array("category" => "Chemistry")), linkto("index.php", $page_vars, array("category" => "Bioinformatics")), linkto("index.php", $page_vars, array("category" => "Neuroscience")), linkto("index.php", $page_vars, array("category" => "Life Sciences")));
示例#18
0
    print "<div class='sidebox_content'>";
    print "<p class='description'>Connotea users who tag items with \"{$safe_tag}\" include...</p>";
    foreach ($users as $key => $value) {
        print "<p><a href='http://www.connotea.org/user/{$key}'>{$key}</a>";
    }
    print "</div>";
    print "</div>";
}
$blogs = get_blogs_using_tag($safe_tag, 25);
if ($blogs) {
    print "<div class='sidebox'>";
    print "<div class='sidebox_title'>Blogs</div>";
    print "<div class='sidebox_content'>";
    print "<p class='description'>Blogs containing posts tagged \"{$safe_tag}\" include...</p>";
    foreach ($blogs as $key => $value) {
        print "<p><a href='" . linkto("blog_search.php", $GLOBALS['page_vars'], array("blog_id" => $key)) . "'>{$value}</a>";
    }
    print "</div>";
    print "</div>";
}
print "</div>";
print "<div class='content'>";
if ($safe_tag) {
    print "<h1>Items tagged with \"{$safe_tag}\"</h1>";
    $paper_ids = array();
    $paper_ids = get_papers_with_tag($safe_tag, true);
    if ($paper_ids) {
        print "<h3>Papers</h3>";
        $papers = get_papers("cited", array("paper_id" => $paper_ids));
        foreach ($papers as $paper) {
            print_paper($paper, array("display" => "minimal"));
示例#19
0
  */
 case "lightbox":
     $lightboxResult = mysqli_query($db, "\r\n\t\t\t\t\tSELECT *\r\n\t\t\t\t\tFROM {$dbinfo[pre]}lightboxes \r\n\t\t\t\t\tWHERE ulightbox_id = '{$id}'\r\n\t\t\t\t\t");
     if ($returnRows = mysqli_num_rows($lightboxResult)) {
         $lightbox = mysqli_fetch_array($lightboxResult);
         $smarty->assign('lightboxRows', $returnRows);
         $smarty->assign('lightbox', $lightbox);
     }
     // Update crumbs links
     unset($_SESSION['crumbsSession']);
     $lightboxMediaPageLink['page'] = "gallery.php?mode=lightbox&page=1";
     $crumbs[0]['linkto'] = linkto($lightboxMediaPageLink);
     // Check for SEO
     $crumbs[0]['name'] = $lang['lightboxes'];
     //
     $crumbs[1]['linkto'] = linkto($lightboxMediaPageLink);
     // Check for SEO
     $crumbs[1]['name'] = $lightbox['name'];
     //
     $_SESSION['crumbsSession'] = $crumbs;
     // Assign these to a session to be used elsewhere
     /*
     $sql = 
     "
     	SELECT {$dbinfo[pre]}media.umedia_id
     	FROM {$dbinfo[pre]}media
     	LEFT JOIN {$dbinfo[pre]}lightbox_items  
     	ON {$dbinfo[pre]}media.media_id = {$dbinfo[pre]}lightbox_items.media_id
     	WHERE {$dbinfo[pre]}lightbox_items.lb_id = '{$lightbox[lightbox_id]}'
     	GROUP BY {$dbinfo[pre]}media.media_id
     ";
示例#20
0
        if ($safe_journal) {
            print "<p>Subscribe to papers from {$safe_journal}:";
        }
    }
}
feedbox("Latest papers", "atom.php?category={$safe_category}&journal={$safe_journal}&type=latest_papers");
feedbox("Recent hot papers", "atom.php?category={$safe_category}&journal={$safe_journal}&type=popular_papers");
?>
</div>
</div>
<div class='sidebox'>
<div class='sidebox_title'>Show papers with comments from...</div>
<div class='sidebox_content'>
<?php 
if ($safe_comment_source) {
    print " <p>limiting to papers with comments from <b>{$safe_comment_source}</b> (<a href='" . linkto("papers.php", $page_vars, array("comment_source" => false)) . "'>remove limit</a>)";
}
?>
<div class='basic_thumbnail'><a href='<?php 
plinkto("papers.php", $page_vars, array("comment_source" => "Nature Highlights"));
?>
'><img border='0' src='images/hilight_comment.png'/></a></div>
<div class='basic_thumbnail'><a href='<?php 
plinkto("papers.php", $page_vars, array("comment_source" => "F1000 Biology"));
?>
'><img border='0' src='images/f1000_comment.png'/></a></div>
<div class='basic_thumbnail'><a href='<?php 
plinkto("papers.php", $page_vars, array("comment_source" => "Connotea"));
?>
'><img border='0' src='images/comment_connotea.jpg'/></a></div>
<!--
示例#21
0
//$cpos["access_data"] = array('status','2','1','outputdata');///資料設定
//$cpos["access_data_token"] = true;
if ($_POST) {
    if (($_POST["pic"][0] == '' || $_POST["pic"][0] == NULL) && count($_POST["pic"]) <= 1) {
        $_POST["pic"] = '';
    } elseif (($_POST["pic"][0] == '' || $_POST["pic"][0] == NULL) && count($_POST["pic"]) > 1) {
        unset($_POST["pic"][0]);
    }
}
include_once "category_class.php";
//-分類樹核心 create by Jones
$cpos["list_update_func"] = "cate_mode_reload(" . $mode . ",0,\$conn,'" . $cpos["table"] . "');";
include_once "centerpoes.php";
cate_mode_reload($mode, 0, $conn, $cpos["table"]);
if ($_POST) {
    linkto($_SERVER['REQUEST_URI']);
}
//--尋找分類數層級
if (isset($_GET["parent_id"])) {
    $depth_data = $conn->GetRow("select * from " . $cpos["table"] . " where id='" . quotes($_GET["parent_id"]) . "'");
    $depth = $depth_data["depth"] * 1 + 1;
    $data["one"]["parent_id"] = $depth_data["id"];
} elseif ($data["one"]["depth"]) {
    $depth = $data["one"]["depth"];
} else {
    $depth = '1';
}
//明細
if ($_SESSION["admin_info"]["view"] == "detail") {
    $data["pic_size_title"] = "任意比例";
    $data["uploadfilemax"] = 50;
示例#22
0
function print_menu_item($page, $page_title, $page_type = false, $override = array())
{
    global $page_vars;
    global $PAGE_TYPE;
    $selected = "class='title_menu_button'";
    if ($PAGE_TYPE == $page_type) {
        $selected = "class='title_menu_button_selected'";
    }
    print "<div {$selected}><a href='" . linkto($page, $page_vars, $override) . "'>{$page_title}</a>&nbsp;</div>";
}
示例#23
0
            $counter = 0;
            foreach ($posts as $post) {
                $counter++;
                $filters = array();
                # first story should have an image and the summary - further stories just have a title
                if ($counter >= 2) {
                    $filters['short'] = true;
                } else {
                    $filters['image'] = true;
                }
                print_post($post, $filters);
                if ($counter == 1) {
                    print "<div class='postbox_postboxes'>";
                }
            }
            if ($counter) {
                print "</div>";
                # ends the postbox_postboxes div
            }
        }
        printf("<a href='%s'>read more posts on this topic...</a>", linkto("posts.php", $page_vars, array("term" => $terms[$i])));
        print "</div>\n";
        print "</div>";
    }
}
print "<div class='frontpage_footer'>&nbsp;</div>";
?>
</div>
</div>
<?php 
include "footer.php";
示例#24
0
                $shopping_car = new order($console->conn, PREFIX . "shopping_car", PREFIX . "shopping_car_list", PREFIX . "products");
                $temp_del = $shopping_car->car_list();
                if ($temp_del) {
                    $temp_id_str = '';
                    foreach ($temp_del as $k => $v) {
                        if ($temp_id_str != '') {
                            $temp_id_str .= ',';
                        }
                        $temp_id_str .= $v["shopping_car_list_id"];
                    }
                    $shopping_car->car_remove($temp_id_str);
                }
                if ($_SESSION["login_page"]) {
                    //-判斷有否暫存頁面
                    $temp = $_SESSION["login_page"];
                    unset($_SESSION["login_page"]);
                    linkto($temp);
                } else {
                    linkto($console->_j_web_set['main_path'] . "/member/detail");
                }
            } else {
                alert($console->tags('INFO_INSERT_ERRO'), -1);
                //請確認資料是否正確
                exit;
            }
        }
        break;
}
$console->module->foor($console->path[0] . '_' . $console->path[1]);
$console->module->foor->set('data', $data)->set('member_info', @$_SESSION["member_info"])->set('cookie', @$_COOKIE["cookie"])->set("setup", $_SETUP)->set("content", @$content)->set("web_set", @$web_set)->set("lang", @$_SESSION["mode_lang"]);
$console->module->foor->work();