本文整理汇总了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);
}
示例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);
}
示例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);
}