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


PHP templates::javascript_senderror方法代码示例

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


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

示例1: graph2

function graph2()
{
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $uidtable = $q->uid_to_tablename($_GET["member-value"]);
    $sql = "SELECT SUM(size) as size,zDate,familysite FROM `www_{$uidtable}` GROUP BY\n\tfamilysite,zDate HAVING familysite='{$_GET["familysite"]}' ORDER BY zDate";
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error);
    }
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $size = $ligne["size"];
        $size = $size / 1024;
        $size = $size / 1024;
        $size = round($size, 2);
        $date = strtotime($ligne["zDate"] . "00:00:00");
        $xdata[] = date("m-d", $date);
        $ydata[] = $size;
    }
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->xAxis = $xdata;
    $highcharts->Title = "{$_GET["familysite"]} {size} (MB)";
    $highcharts->yAxisTtitle = "{size}";
    $highcharts->xAxisTtitle = "{days}";
    $highcharts->datas = array("{requests}" => $ydata);
    echo $highcharts->BuildChart();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:28,代码来源:miniadm.webstats.ByMember.website.php

示例2: graph4

function graph4()
{
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $xtime = $_GET["xtime"];
    $hourtable = date("Ymd", $xtime) . "_hour";
    $sql = "SELECT SUM(size) as size,`hour`,uid,category FROM {$hourtable} GROUP BY\n\tcategory,`hour`,uid HAVING `hour`='{$_GET["hour"]}' AND uid='{$_GET["uid"]}' ORDER BY `size` DESC LIMIT 0,15";
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error);
    }
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $size = $ligne["size"];
        $size = $size / 1024;
        $size = $size / 1024;
        $size = round($size, 2);
        $PieData[$ligne["category"]] = $size;
    }
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error, $_GET["container"]);
    }
    $tpl = new templates();
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->PieDatas = $PieData;
    $highcharts->ChartType = "pie";
    $highcharts->PiePlotTitle = "{top_websites} {size} (MB) {$_GET["hour"]}h";
    $highcharts->Title = $tpl->_ENGINE_parse_body("{top_categories}/{size} {$_GET["hour"]}h");
    echo $highcharts->BuildChart();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:30,代码来源:miniadm.webstats.ByMember.ByHour.php

示例3: graph5

function graph5()
{
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $sql = "SELECT SUM( size ) AS size, familysite\nFROM `visited_sites_days`\nGROUP BY familysite ORDER BY size DESC LIMIT 0,10";
    $results = $q->QUERY_SQL($sql);
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $size = round($ligne["size"] / 1024 / 1000);
        $PieData[$ligne["familysite"]] = $size;
    }
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error, $_GET["container"]);
    }
    $tpl = new templates();
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->PieDatas = $PieData;
    $highcharts->ChartType = "pie";
    $highcharts->PiePlotTitle = "{websites}";
    $highcharts->Title = $tpl->_ENGINE_parse_body("{top_websites}/{size}");
    echo $highcharts->BuildChart();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:22,代码来源:miniadm.webstats-start.php

示例4: graph3

function graph3()
{
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $sql = "SELECT SUM( hits ) AS size, uid\nFROM `members_uid`\nGROUP BY uid HAVING uid NOT LIKE '%\$' AND LENGTH(uid) >0 ORDER BY size DESC LIMIT 0,10";
    $results = $q->QUERY_SQL($sql);
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $size = $ligne["size"];
        $PieData[$ligne["uid"]] = $size;
    }
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error, $_GET["container"]);
    }
    $tpl = new templates();
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->PieDatas = $PieData;
    $highcharts->ChartType = "pie";
    $highcharts->PiePlotTitle = "{hits}";
    $highcharts->Title = $tpl->_ENGINE_parse_body("{top_members}/{hits}");
    echo $highcharts->BuildChart();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:22,代码来源:miniadm.webstats.members2.php

示例5: graph5

function graph5()
{
    $q = new mysql_squid_builder();
    $page = CurrentPageName();
    $tpl = new templates();
    $t = $_GET["t"];
    $ff = time();
    $tablename = date("Ymd", $_GET["xtime"]) . "_hour";
    $category = mysql_escape_string2($_GET["category"]);
    $sql = "SELECT SUM(size) as thits, category,uid FROM `{$tablename}`\n\tGROUP BY category,uid \n\tHAVING category='{$category}'\n\tORDER BY thits DESC LIMIT 0,10";
    $unknown = $tpl->_ENGINE_parse_body("{unknown}");
    $c = 0;
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error, $_GET["container"]);
    }
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        if (trim($ligne["uid"]) == null) {
            $ligne["uid"] = $unknown;
        }
        $ligne["thits"] = round($ligne["thits"] / 1024 / 1000);
        $PieData[$ligne["uid"]] = $ligne["thits"];
        $c++;
    }
    $tpl = new templates();
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->PieDatas = $PieData;
    $highcharts->ChartType = "pie";
    $highcharts->PiePlotTitle = "{hits}";
    $highcharts->Title = $tpl->_ENGINE_parse_body("{$category}: {top_members_by_size} (MB)");
    echo $highcharts->BuildChart();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:33,代码来源:miniadm.webstats.websites.ByDayByCategory.php

示例6: graph1

function graph1()
{
    $q = new mysql_squid_builder();
    $page = CurrentPageName();
    $tpl = new templates();
    $t = $_GET["t"];
    $ff = time();
    $tablename = $_GET["tablename"];
    if (is_numeric($_GET["xtime"])) {
        $tablename = date("Ymd", $_GET["xtime"]) . "_hour";
    }
    $sql = "SELECT SUM(hits) as thits, `hour` FROM {$tablename} GROUP BY `hour` ORDER BY `hour`";
    $c = 0;
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error, $_GET["container"]);
    }
    if (mysql_num_rows($results) > 0) {
        $nb_events = mysql_num_rows($results);
        while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
            $xdata[] = $ligne["hour"];
            $ydata[] = $ligne["thits"];
            $c++;
        }
    }
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->xAxis = $xdata;
    $highcharts->Title = "{hits}/{hour}";
    $highcharts->yAxisTtitle = "{hits}";
    $highcharts->xAxisTtitle = "{hours}";
    $highcharts->datas = array("{hits}" => $ydata);
    echo $highcharts->BuildChart();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:34,代码来源:miniadm.webstats.websites.byday.php

示例7: graph9

function graph9()
{
    $tpl = new templates();
    $unknown = $tpl->_ENGINE_parse_body("{unknown}");
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $uidtable = $q->uid_to_tablename($_GET["member-value"]);
    $sql = "SELECT SUM(hits) as hits,sitename FROM `blocked_{$uidtable}` GROUP BY\n\tsitename ORDER BY hits DESC LIMIT 0,15";
    $results = $q->QUERY_SQL($sql);
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $size = $ligne["hits"];
        if (trim($ligne["sitename"]) == null) {
            $ligne["sitename"] = $unknown;
        }
        $PieData[$ligne["sitename"]] = $size;
    }
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error, $_GET["container"]);
    }
    $tpl = new templates();
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->PieDatas = $PieData;
    $highcharts->ChartType = "pie";
    $highcharts->PiePlotTitle = "{hits}";
    $highcharts->Title = $tpl->_ENGINE_parse_body("{blocked}/{top_websites}/{hits}");
    echo $highcharts->BuildChart();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:28,代码来源:miniadm.webstats.ByMember.php

示例8: graph4

function graph4()
{
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $tablename = "www_" . $q->uid_to_tablename($_GET["uid"]);
    $sql = "SELECT SUM(hits) as hits,familysite,category FROM `{$tablename}` GROUP BY familysite,category\n\tHAVING `category`='{$_GET["category"]}'\n\tORDER BY hits DESC LIMIT 0,15";
    if ($_GET["category"] == null) {
        $sql = "SELECT SUM(hits) as hits,familysite,category FROM `{$tablename}` GROUP BY familysite,category\n\t\tHAVING `category` IS NULL\n\t\tORDER BY hits DESC LIMIT 0,15";
    }
    $results = $q->QUERY_SQL($sql);
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $size = $ligne["hits"];
        $PieData[$ligne["familysite"]] = $size;
    }
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error, $_GET["container"]);
    }
    $tpl = new templates();
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->PieDatas = $PieData;
    $highcharts->ChartType = "pie";
    $highcharts->PiePlotTitle = "{hits}";
    $highcharts->Title = $tpl->_ENGINE_parse_body("{$_GET["category"]}/{top_websites}/{size}");
    echo $highcharts->BuildChart();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:26,代码来源:miniadm.webstats.ByMember.ByCategory.php

示例9: history_month_graph1

function history_month_graph1()
{
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $xtime = $_GET["xtime"];
    $month_table = $_GET["table"];
    $sql = "SELECT `day` as tday,SUM(size) as QuerySize FROM\n\t`{$month_table}`  WHERE `{$_GET["field"]}`='{$_GET["value"]}'\n\tGROUP BY tday ORDER BY tday";
    $fieldgroup = "day";
    $x_title = "{days}";
    $maintitle = "downloaded_size_per_day";
    $maintitle2 = "requests_per_day";
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error);
    }
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $size = round($ligne["QuerySize"] / 1024 / 1000);
        $xdata[] = $ligne["day"];
        $ydata[] = $size;
    }
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->xAxis = $xdata;
    $highcharts->Title = "{downloaded_size_per_day} (MB)";
    $highcharts->yAxisTtitle = "{size} (MB)";
    $highcharts->LegendSuffix = " MB";
    $highcharts->xAxisTtitle = "{days}";
    $highcharts->datas = array("{size}" => $ydata);
    echo $highcharts->BuildChart();
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:30,代码来源:squid.members.zoom.php

示例10: graph2

function graph2(){
	$tpl=new templates();
	$page=CurrentPageName();
	$t=time();
	$CurTime=date("YmdH");
	$CurDay=date("Ymd");
	$q=new mysql();
	$sock=new sockets();
	$hostname=$hostname=$sock->GET_INFO("myhostname");
	if($hostname==null){$hostname=$sock->getFrameWork("system.php?hostname-g=yes");$sock->SET_INFO($hostname,"myhostname");}
	

	$title="$hostname: %{cpu} {yesterday}";
	$timetext="{hour}";

	$sql="SELECT DATE_FORMAT(zDate,'%Y-%m-%d') as tdate,hostname,
	HOUR(zDate) as `time`,AVG(cpu) as value FROM `cpustats` GROUP BY `time` ,tdate,hostname
	HAVING tdate=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 DAY),'%Y-%m-%d') AND `hostname`='$hostname' ORDER BY `time`";




	$results=$q->QUERY_SQL($sql,"artica_events");
	if(!$q->ok){$tpl->javascript_senderror($q->mysql_error,$_GET["container"]);}

	while($ligne=@mysql_fetch_array($results,MYSQL_ASSOC)){
		$xdata[]=$ligne["time"];
		$ydata[]=$ligne["value"];
	}

	$highcharts=new highcharts();
	$highcharts->container=$_GET["container"];
	$highcharts->xAxis=$xdata;
	$highcharts->Title=$title;
	$highcharts->TitleFontSize="14px";
	$highcharts->AxisFontsize="12px";
	$highcharts->yAxisTtitle=" {cpu} % ";
	$highcharts->xAxis_labels=true;
	$highcharts->LegendPrefix=$tpl->_ENGINE_parse_body("{cpu} ");
	$highcharts->LegendSuffix="%";
	$highcharts->xAxisTtitle=$timetext;
	$highcharts->datas=array("{%}"=>$ydata);
	echo $highcharts->BuildChart();



}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:47,代码来源:system.cpustats.php

示例11: graph2

function graph2()
{
    $tpl = new templates();
    $unknown = $tpl->_ENGINE_parse_body("{unknown}");
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $_GET["uid"] = mysql_escape_string2($_GET["uid"]);
    $sql = "SELECT SUM(hits) as hits,category,zDate,uid FROM `youtube_all` GROUP BY\n\tcategory,zDate,uid HAVING zDate='" . date("Y-m-d", $_GET["xtime"]) . "' AND uid='{$_GET["uid"]}' ORDER BY hits DESC LIMIT 0,15";
    $results = $q->QUERY_SQL($sql);
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $size = $ligne["hits"];
        if (trim($ligne["category"]) == null) {
            $ligne["category"] = $unknown;
        }
        $PieData[$ligne["category"]] = $size;
    }
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error . "<br>{$sql}", $_GET["container"]);
    }
    $tpl = new templates();
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->PieDatas = $PieData;
    $highcharts->ChartType = "pie";
    $highcharts->PiePlotTitle = "{categories}";
    $highcharts->Title = $tpl->_ENGINE_parse_body("{top_categories}/{hits}");
    echo $highcharts->BuildChart();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:28,代码来源:miniadm.webstats.ByMember.youtube.Byday.php

示例12: generate_graph

function generate_graph()
{
    $q = new mysql_squid_builder();
    $page = CurrentPageName();
    $tpl = new templates();
    $t = $_GET["t"];
    $ff = time();
    $xtime = $_GET["xtime"];
    $tablename = "youtubeday_" . date("Ymd", $xtime);
    $sql = "SELECT SUM(hits) as thits, hour FROM {$tablename} GROUP BY hour ORDER BY hour";
    $c = 0;
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error . "<br>{$sql}", $_GET["container"]);
    }
    if (mysql_num_rows($results) > 0) {
        $nb_events = mysql_num_rows($results);
        while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
            $xdata[] = $ligne["hour"];
            $ydata[] = $ligne["thits"];
            $c++;
        }
        $highcharts = new highcharts();
        $highcharts->container = $_GET["container"];
        $highcharts->xAxis = $xdata;
        $highcharts->Title = "Youtube: {statistics} " . $tpl->_ENGINE_parse_body("{hits}/{hours}");
        $highcharts->yAxisTtitle = "{requests}";
        $highcharts->xAxisTtitle = "{hours}";
        $highcharts->datas = array("{requests}" => $ydata);
        echo $highcharts->BuildChart();
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:32,代码来源:miniadm.webstats.websites.ByDayYoutube.php

示例13: graph5

function graph5()
{
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $hourtable = date("Ymd", $_GET["xtime"]) . "_hour";
    $sql = "SELECT SUM(size) as size,`familysite`,MAC FROM {$hourtable} GROUP BY MAC,`familysite` HAVING MAC='{$_GET["MAC"]}' ORDER BY hits DESC LIMIT 0,15";
    $results = $q->QUERY_SQL($sql);
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $size = $ligne["size"];
        $size = $size / 1024;
        $size = $size / 1024;
        $size = round($size, 2);
        $PieData[$ligne["familysite"]] = $size;
    }
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error, $_GET["container"]);
    }
    $tpl = new templates();
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->PieDatas = $PieData;
    $highcharts->ChartType = "pie";
    $highcharts->PiePlotTitle = "{size} (MB)";
    $highcharts->Title = $tpl->_ENGINE_parse_body("{top_websites}/{size}");
    echo $highcharts->BuildChart();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:26,代码来源:miniadm.webstats.ByMAC.popup.php

示例14: graph2

function graph2()
{
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $xtime = $_GET["xtime"];
    $hourtable = date("Ymd", $xtime) . "_hour";
    $sql = "SELECT SUM(size) as size,`hour`,uid,familysite FROM {$hourtable} GROUP BY\n\tfamilysite,`hour`,uid HAVING familysite='{$_GET["familysite"]}' AND uid='{$_GET["uid"]}' ORDER BY `hour`";
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error);
    }
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $size = $ligne["size"];
        $size = $size / 1024;
        $size = $size / 1024;
        $size = round($size, 2);
        $xdata[] = $ligne["hour"];
        $ydata[] = $size;
    }
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->xAxis = $xdata;
    $highcharts->Title = "{$_GET["familysite"]} {size}/{hour} (MB)";
    $highcharts->yAxisTtitle = "{size}";
    $highcharts->xAxisTtitle = "{hours}";
    $highcharts->datas = array("{size}" => $ydata);
    echo $highcharts->BuildChart();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:28,代码来源:miniadm.webstats.ByMember.website.byday.php

示例15: section_topou_graph1

function section_topou_graph1()
{
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $year = $_GET["year"];
    $month = $_GET["month"];
    $table = "quotamonth_{$year}{$month}";
    $sql = "SELECT `ou`,SUM(size) as `size` FROM {$table} GROUP BY `ou`\n\tORDER BY `size` DESC LIMIT 0,20 ";
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        $tpl->javascript_senderror($q->mysql_error, $_GET["container"]);
    }
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $size = $ligne["size"];
        $size = $size / 1024;
        $size = $size / 1024;
        $size = round($size);
        if ($ligne["ou"] == null) {
            $ligne["ou"] = "unknown";
        }
        $PieData[$ligne["ou"]] = $size;
    }
    $tpl = new templates();
    $highcharts = new highcharts();
    $highcharts->container = $_GET["container"];
    $highcharts->PieDatas = $PieData;
    $highcharts->ChartType = "pie";
    $highcharts->PiePlotTitle = "{size} MB";
    $highcharts->Title = $tpl->_ENGINE_parse_body("{top_ou} {size} MB");
    echo $highcharts->BuildChart();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:31,代码来源:miniadm.webstats.ByMonth.php


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