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


PHP mysql_squid_builder::GET_THUMBNAIL方法代码示例

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


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

示例1: json_familysite

function json_familysite()
{
    $q = new mysql_squid_builder();
    $search = '%';
    $table = "visited_sites";
    $page = 1;
    $ORDER = "ORDER BY HitsNumber DESC";
    if ($q->COUNT_ROWS($table) == 0) {
        echo "<H2>" . $tpl->_ENGINE_parse_body("TABLE:{$table}<br>{error_no_datas}") . "</H2>";
        return;
    }
    if (isset($_POST["sortname"])) {
        if ($_POST["sortname"] != null) {
            $ORDER = "ORDER BY {$_POST["sortname"]} {$_POST["sortorder"]}";
        }
    }
    if (isset($_POST['page'])) {
        $page = $_POST['page'];
    }
    if ($_POST["query"] != null) {
        $_POST["query"] = str_replace("*", "%", $_POST["query"]);
        $search = $_POST["query"];
        $sql = "SELECT COUNT(sitename) as TCOUNT FROM `{$table}` WHERE (`sitename` LIKE '{$search}') AND familysite='{$_GET["familysite"]}'";
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
        $total = $ligne["TCOUNT"];
    } else {
        $sql = "SELECT COUNT(sitename) as TCOUNT FROM `{$table}` WHERE familysite='{$_GET["familysite"]}'";
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
        $total = $ligne["TCOUNT"];
    }
    if (isset($_POST['rp'])) {
        $rp = $_POST['rp'];
    }
    $pageStart = ($page - 1) * $rp;
    $limitSql = "LIMIT {$pageStart}, {$rp}";
    $sql = "SELECT sitename,HitsNumber ,Querysize,category FROM `{$table}` WHERE (`sitename` LIKE '{$search}') AND familysite='{$_GET["familysite"]}' {$ORDER} {$limitSql}";
    writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
    $div = "<div style=\"padding-top:10px;font-size:14px\">";
    $data = array();
    $data['page'] = $page;
    $data['total'] = $total;
    $data['rows'] = array();
    $results = $q->QUERY_SQL($sql);
    while ($ligne = mysql_fetch_assoc($results)) {
        $thumbs = $q->GET_THUMBNAIL($ligne['sitename'], 48);
        $ligne["Querysize"] = FormatBytes($ligne["Querysize"] / 1024);
        $ligne['HitsNumber'] = numberFormat($ligne['HitsNumber'], 0, "", " ");
        $data['rows'][] = array('id' => $ligne['sitename'], 'cell' => array($thumbs, "{$div}{$ligne['sitename']}</div>", $div . $ligne['HitsNumber'] . "</div>", $div . $ligne["Querysize"] . "</div>", $div . $ligne['category'] . "</div>"));
    }
    echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:51,代码来源:squid.search.statistics.php

示例2: rethumbnail

function rethumbnail()
{
    $sock = new sockets();
    $sock->getFrameWork("squid.php?rethumbnail={$_GET["rethumbnail"]}");
    $q = new mysql_squid_builder();
    echo $q->GET_THUMBNAIL($_GET["rethumbnail"], 320);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:7,代码来源:miniadm.webstats.website.infos.php

示例3: visited_list

function visited_list()
{
    $tpl = new templates();
    $MyPage = CurrentPageName();
    $q = new mysql_squid_builder();
    $family = $q->GetFamilySites($_GET["www"]);
    $search = '%';
    $table = "visited_sites";
    $page = 1;
    $COUNT_ROWS = $q->COUNT_ROWS($table);
    $FORCE_FILTER = "familysite='{$family}'";
    if ($COUNT_ROWS == 0) {
        json_error_show("No data...");
    }
    if (isset($_POST["sortname"])) {
        if ($_POST["sortname"] != null) {
            $ORDER = "ORDER BY {$_POST["sortname"]} {$_POST["sortorder"]}";
        }
    }
    if (isset($_POST['page'])) {
        $page = $_POST['page'];
    }
    $_POST["query"] = trim($_POST["query"]);
    if ($_POST["query"] != null) {
        $_POST["query"] = "*{$_POST["query"]}*";
        $_POST["query"] = str_replace("**", "*", $_POST["query"]);
        $_POST["query"] = str_replace("**", "*", $_POST["query"]);
        $_POST["query"] = str_replace("*", "%", $_POST["query"]);
        $search = $_POST["query"];
        $searchstring = "AND (`{$_POST["qtype"]}` LIKE '{$search}')";
        $sql = "SELECT COUNT(*) as TCOUNT FROM `{$table}` WHERE {$FORCE_FILTER} {$searchstring}";
        writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
        $total = $ligne["TCOUNT"];
    } else {
        $sql = "SELECT COUNT(*) as TCOUNT FROM `{$table}` WHERE {$FORCE_FILTER}";
        writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
        $total = $ligne["TCOUNT"];
    }
    if (isset($_POST['rp'])) {
        $rp = $_POST['rp'];
    }
    $pageStart = ($page - 1) * $rp;
    $limitSql = "LIMIT {$pageStart}, {$rp}";
    $sql = "SELECT *  FROM `{$table}` WHERE {$searchstring} {$FORCE_FILTER} {$ORDER} {$limitSql}";
    writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
    $results = $q->QUERY_SQL($sql);
    $data = array();
    $data['page'] = $page;
    $data['total'] = $total;
    $data['rows'] = array();
    if (mysql_num_rows($results) == 0) {
        $data['rows'][] = array('id' => $ligne[time()], 'cell' => array($sql, "", "", ""));
    }
    while ($ligne = mysql_fetch_assoc($results)) {
        $categories = $q->GET_CATEGORIES($ligne['sitename']);
        $FamilySite = $q->GetFamilySites($ligne['sitename']);
        $categorize = imgtootltip("add-database-32.png", $ligne['sitename'], "javascript:Loadjs('squid.categorize.php?www={$ligne['sitename']}&day={$_GET["day"]}&week={$_GET["week"]}&month={$_GET["month"]}');");
        $thumbs = $q->GET_THUMBNAIL($ligne['sitename'], 48);
        $ahref = "Loadjs('squid.traffic.statistics.days.php?today-zoom=yes&type=req&familysite={$FamilySite}&day={$_GET["day"]}')";
        $data['rows'][] = array('id' => $ligne['sitename'], 'cell' => array($thumbs, "<div style='margin-top:10px'><a href=\"javascript:blur();\" OnClick=\"javascript:{$ahref}\" style='font-size:14px;text-decoration:underline'>{$ligne['sitename']}</a></div>", "<div style='font-size:14px;margin-top:10px'>{$categories}</span>", $categorize));
    }
    echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:65,代码来源:squid.websites.infos.php


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