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


PHP make_header函数代码示例

本文整理汇总了PHP中make_header函数的典型用法代码示例。如果您正苦于以下问题:PHP make_header函数的具体用法?PHP make_header怎么用?PHP make_header使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: main

function main($url, $user, $secret_key, $param)
{
    //加速乐开放API主函数
    ksort($param);
    $token = make_signiture($secret_key, $param);
    $header = make_header($user, $token);
    $postdata = http_build_query($param);
    $ret_cont = http_request($url, $postdata, $header);
    return $ret_cont;
}
开发者ID:xxl123,项目名称:jsl-open-api,代码行数:10,代码来源:api_test.php

示例2: bak

function bak()
{
    global $db;
    $fpath = "bak/" . date('Ymd', time()) . "_" . getRndStr(10);
    $sql = "";
    $p = 1;
    $tables = "{pre}art_topic,{pre}art_type,{pre}comment,{pre}gbook,{pre}link,{pre}mood,{pre}user,{pre}user_card,{pre}user_group,{pre}user_visit,{pre}vod_topic,{pre}vod_type,{pre}art,{pre}vod";
    $tables = replaceStr($tables, "{pre}", app_tablepre);
    $tablearr = explode(",", $tables);
    foreach ($tablearr as $table) {
        $sql .= make_header($table);
        $rsfield = $db->getTableFields(app_dbname, $table);
        $i = 0;
        while ($rowfield = mysql_fetch_field($rsfield)) {
            $fs[$i] = trim($rowfield->name);
            $i++;
        }
        unset($rsfield);
        $fsd = $i - 1;
        $nums = $db->getOne("select count(*) from {$table}");
        $pagecount = 1;
        if ($nums > 1000) {
            $pagecount = ceil($nums / 1000);
        }
        for ($n = 1; $n <= $pagecount; $n++) {
            $rsdata = $db->getAll("select * from {$table} limit " . 1000 * ($n - 1) . ",1000");
            $rscount = count($rsdata);
            $intable = "INSERT INTO `{$table}` VALUES(";
            for ($j = 0; $j < $rscount; $j++) {
                $line = $intable;
                for ($k = 0; $k <= $fsd; $k++) {
                    if ($k < $fsd) {
                        $line .= "'" . mysql_escape_string($rsdata[$j][$fs[$k]]) . "',";
                    } else {
                        $line .= "'" . mysql_escape_string($rsdata[$j][$fs[$k]]) . "');\r\n";
                    }
                }
                $sql .= $line;
                if (strlen($sql) >= 2000000) {
                    $fname = $fpath . "-" . $p . ".sql";
                    fwrite(fopen($fname, "wb"), $sql);
                    $p++;
                    $sql = "";
                }
            }
            unset($rsdata);
        }
        unset($fs);
    }
    $sql .= make_manager(replaceStr("{pre}manager", "{pre}", app_tablepre));
    $fname = $fpath . "-" . $p . ".sql";
    fwrite(fopen($fname, "wb"), $sql);
    echo "备份成功";
}
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:54,代码来源:admin_db.php

示例3: array

$title = $row["title"];
$basepath = $row["filename"];
$rootid = $row["id"];
$xslname = "xrai";
if ($id_pool) {
    $localisation[] = array("{$pool['name']}", "{$base_url}/pool.php?id_pool={$id_pool}", "Pool for topic {$pool['idtopic']}");
}
$i = sizeof($localisation);
do {
    if (DB::isError($row)) {
        fatal_error("Database error", $row->getUserInfo());
    }
    array_splice($localisation, $i, 0, array(array($row["filename"] != "" ? $row["filename"] : $row["collection"], "{$base_url}/collections/{$row['collection']}/{$row['filename']}?id_pool={$id_pool}", $row["title"])));
} while ($row["parent"] > 0 && ($row =& $xrai_db->getRow("SELECT * FROM {$db_files} WHERE id=?", array($row["parent"]))));
$up_url = $localisation[sizeof($localisation) - 2][1];
make_header("{$title}");
$xslfilename = dirname(__FILE__) . "/xsl/{$xslname}.xsl";
$xmlfilename = "{$xml_documents}/{$_SERVER['PATH_INFO']}/index.xrai";
// --- Retrieve assessments ---
if ($id_pool) {
    $res =& $xrai_db->query("SELECT * FROM {$db_statusview} WHERE rootid=? AND idpool={$id_pool}", array($rootid));
    if (DB::isError($res)) {
        non_fatal_error("Error while retrieving assessments", $res->getUserInfo());
    } else {
        while ($row = $res->fetchRow()) {
            $s = ($row["status"] == 2 ? 2 : 1) * ($row["inpool"] == $db_true ? 1 : -1);
            $assessments[$row["filename"]][$s] = $row["count"];
            $all_assessments[$s] += $row["count"];
            if (abs($row["status"]) != 3 && $row["count"] > 0) {
                $todojs .= ($todojs ? "," : "todo = new Array(") . "'{$row['filename']}'";
            }
开发者ID:BackupTheBerlios,项目名称:x-rai-svn,代码行数:31,代码来源:collections.php

示例4: jsalert

         if (write_file($sql, $filename)) {
             $msgs = "表-" . $_POST['tablename'] . "-数据备份完成,生成备份文件./backup/{$filename}";
         } else {
             $msgs = "备份表-" . $_POST['tablename'] . "-失败";
         }
         echo jsalert($msgs, "backup.php");
         exit;
     }
 } else {
     //分卷备份
     if (!$_POST['filesize']) {
         $msgs = "请填写备份文件分卷大小";
         echo jsalert($msgs, "backup.php");
         exit;
     }
     $sql = make_header($_POST['tablename']);
     $p = 1;
     $filename = date("Ymd", time()) . "_" . $_POST['tablename'];
     $db->query("select * from " . $_POST['tablename']);
     $num_fields = $db->nf();
     while ($db->nextrecord()) {
         $sql .= make_record($_POST['tablename'], $num_fields);
         if (strlen($sql) >= $_POST['filesize'] * 1000) {
             $filename .= "_v" . $p . ".sql";
             if (write_file($sql, $filename)) {
                 $msgs = "表-" . $_POST['tablename'] . "-卷-" . $p . "-数据备份完成,生成备份文件./backup/{$filename}";
             } else {
                 $msgs = "备份表-" . $_POST['tablename'] . "-失败";
             }
             $p++;
             $filename = date("Ymd", time()) . "_" . $_POST['tablename'];
开发者ID:harriewang,项目名称:pinzui,代码行数:31,代码来源:backup.php

示例5: require

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
*/
require("include/xrai.inc");
if (!$is_root) {
   header("Location: index.php");
   exit;
}

make_header("Statistics");

$state = $_GET["state"];
$states = $xrai_db->getAssoc("SELECT state, count(*) FROM pools GROUP BY state");
if (DB::isError($res)) fatal_error("DB error",$res);

print "<h1>Pool states</h1><ul>";
foreach($states as $s => $n) {
      print "<li><a href=\"?state=$s\">$s</a> ($n pools)</li>";
   }
   print "</ul>";
   
if (!($states[$state] > 0)) {
   make_footer();
   exit();
}
开发者ID:BackupTheBerlios,项目名称:x-rai-svn,代码行数:31,代码来源:stats.php

示例6: array

<?php

/**
 * 获取订单列表
 *
 * Author: yosolin
 * Date: 2016/01/13
 */
require_once "config.php";
require_once "functions.php";
require_once "header.php";
// api url与method
$http_url = "https://sandbox-tradeopen.futu5.com/orders";
// 生产环境去掉 'sandbox-'
$http_method = "GET";
// http请求body
$http_body = array();
// 生成http请求头部
$http_header = make_header($http_body, $http_url, $http_method, false, 'tc');
// http请求
$ret = ssl_curl($http_url, $http_method, $http_header, $http_body, Config::$ssl_cert, Config::$ssl_key);
echo $ret;
开发者ID:futuopen,项目名称:tradeopen,代码行数:22,代码来源:4.get_order_list.php

示例7: chdir



chdir("..");
include_once("include/xrai.inc");
include_once("include/assessments.inc");
include_once("admin/common.php");

$view_state = $_REQUEST["view_state"];
$action  = $_REQUEST["action"];

// Abort with user
ignore_user_abort(true);


if (!$pool_file) {
make_header("View pools" . ($view_state ? " - state \"$view_state\"" : "" ) );

// ---- Delete a pool

if ($action == "delete") {
  $expect = "I want to remove pool $_REQUEST[pool].";
  if ($_REQUEST["confirm"] == $expect) {
    sql_query("delete from $db_assessments where id_pool=$_REQUEST[pool]");
    sql_query("delete from $db_keywords where id_pool=$_REQUEST[pool]");
    sql_query("delete from $db_pools where id_pool=$_REQUEST[pool]");
    print "<div class='message'>Pool $_REQUEST[pool] was <em>deleted</em></div>";
  } else print "<div class='error'>Deletion was not confirmed (expected '$expect' and had '$confirm') </div>";
}

// ---- Clear a pool
if ($action == "clear") {
开发者ID:BackupTheBerlios,项目名称:x-rai-svn,代码行数:29,代码来源:manage_pools.php

示例8: require_once

       (c) B. Piwowarski, 2003
   */


require_once("include/xrai.inc");
require_once("include/astatus.inc");
// require_once("include/assessments.inc");

if (!$id_pool) {
   header("Location: index.php");
   exit;
}

if ($id_pool) $localisation[] = array("$pool[name]","$PHP_SELF", "Pool for topic $pool[idtopic]" );
make_header("Pool summary for topic $id_topic");


// Retrieve assessments


$todojs = "";
$res = &$xrai_db->query("SELECT sv.*,f.collection FROM $db_files f, $db_statusview sv WHERE f.parent is null AND f.id=sv.rootid AND idpool=?",array($id_pool));
if (DB::isError($res)) non_fatal_error("Error while retrieving assessments",$res->getUserInfo());
else {
   while ($row = $res->fetchRow()) {
      $s = ($row["status"] == 2 ? 2 : 1) * ($row["inpool"] == $db_true ? 1 : -1);
//       print "$row[collection] / $s / $row[inpool] $db_true / $row[count]<br/>";
      $a[$row["collection"]][$s] = $row["count"];
      $t[$s] = $row["count"];
      $total[$s]++;
开发者ID:BackupTheBerlios,项目名称:x-rai-svn,代码行数:30,代码来源:pool.php

示例9: make_header

<?php

include "config.php";
// setting cookie back to neutral without $vars:
//setcookie("authacc");
require "account_inc.php";
// making header and title:
make_header("account: logout");
?>
Succesfully logged out!<br>
<a href="<?php 
// as defined in the config.php
echo $logout_url;
?>
">click here</a> to continue
<?php 
// making footerrr:
make_footer();
开发者ID:vgartner,项目名称:gps-tracker,代码行数:18,代码来源:account_logout.php

示例10: endElement

			print "<div style='color:red'>Can't convert $currentfile#$attrs[path]</div>";
		} else {
 			if ($doit) sql_query("INSERT INTO $db_assessments (id_pool,in_pool,inferred,xid) VALUES ($new_id_pool, 'Y','N',$xid)","</div>");
//        $attrs[file]#$attrs[path]\n";
		}
		} else {
			print "<div style='color:red'>No current file for path $attrs[path]</div>";
		}
	}
}

function endElement($parser, $tagname) {
	if ($tagname == "file") $currentfile = false;
}

make_header("Adding a new pool");


$fsize = filesize($_FILES["pool_file"]['tmp_name']);
$cratio = 0;
$bytes_read = 0;

print "<div class='message'>Processing file " . $_FILES[pool_file][name] . "</div><div>";
if (!$doit) print "<div class='message'>Simulation (not inserting in database)</div>\n";
?>
<div style='background: red; width: 90%; padding: 0; margin: 5%;'>
<div id='progress' style='width: 0%; background: blue'>&nbsp;</div>
</div>
<script language="javascript">
var progress = document.getElementById("progress");
</script>
开发者ID:BackupTheBerlios,项目名称:x-rai-svn,代码行数:31,代码来源:add_pool.php

示例11: make_header

<?php

require "include/page.php";
make_header("documentation", "Manual", "./", "@import \"manual.css\";");
?>
<h1 xmlns="http://www.w3.org/1999/xhtml" xmlns:doc="http://cssbox.sourceforge.net/docs">jStyleParser Manual</h1><p xmlns="http://www.w3.org/1999/xhtml" xmlns:doc="http://cssbox.sourceforge.net/docs" class="author">
			[ <a href="manual.html">Downloadable version</a> ]
		</p><div xmlns="http://www.w3.org/1999/xhtml" xmlns:doc="http://cssbox.sourceforge.net/docs" class="toc"><h2>Table of Contents</h2><ul><li><a href="#intro">Introduction</a></li><li><a href="#parsing">Style Sheet Parsing</a><ul><li><a href="#sheet">Parsed style sheet processing</a></li></ul></li><li><a href="#used">Obtaining the style sheets used in an HTML document</a></li><li><a href="#dom">DOM Analysis</a><ul><li><a href="#analyze">Analyzing a Style Sheet</a></li><li><a href="#direct">Simplified and Direct Usage Method</a></li><li><a href="#domstyle">Retrieving the Style of DOM Elements</a></li><li><a href="#pseudoelements">Obtaining the Style of Pseudo-Elements</a></li><li><a href="#pseudoclasses">Applying Pseudo-Classes</a></li></ul></li><li><a href="#media">Media</a><ul><li><a href="#media_parser">Automatic loading of imported style sheets</a></li><li><a href="#media_dom">DOM style analysis</a></li></ul></li><li><a href="#structure">Internal Structure of the Library</a><ul><li><a href="#package_css">Package cz.vutbr.web.css</a></li><li><a href="#package_csskit">Package cz.vutbr.web.csskit</a></li><li><a href="#package_domassign">Package cz.vutbr.web.domassign</a></li></ul></li><li><a href="#extend">Extending Current Version</a><ul><li><a href="#performance">Extending Performance</a></li></ul></li></ul></div><div xmlns="http://www.w3.org/1999/xhtml" xmlns:doc="http://cssbox.sourceforge.net/docs" class="section" id="intro"><h2>Introduction</h2><p>
jStyleParser is a Java library for parsing CSS style sheets and assigning styles to the HTML or XML
document elements according to the W3C CSS 2.1 specification and a subset of the CSS 3 specification.
It allows parsing the individual CSS files as well as computing the efficient style of the DOM elements.  
</p></div><div xmlns="http://www.w3.org/1999/xhtml" xmlns:doc="http://cssbox.sourceforge.net/docs" class="section" id="parsing"><h2>Style Sheet Parsing</h2><p>This functionality may be used for parsing individual style sheets obtained from a remote file (URL),
local file or a string. Three static methods are defined in the <a href="api/cz/vutbr/web/css/CSSFactory.html" class="api"><code>CSSFactory</code></a> class for
this purpose:</p><ul>
	<li><a href="api/cz/vutbr/web/css/CSSFactory.html#parse(java.net.URL, java.lang.String)" class="api"><code>StyleSheet parse(URL url, String encoding)</code></a>, the most general method. 
			Transforms data available at the given <code>url</code>, expecting given <code>encoding</code>,
			or taking the default one if it is not provided.,			
	</li>
	<li><a href="api/cz/vutbr/web/css/CSSFactory.html#parse(java.net.URL, cz.vutbr.web.css.NetworkProcessor, java.lang.String)" class="api"><code>StyleSheet parse(URL url, NetworkProcessor network, String encoding)</code></a> 
			that has the same effect as above with providing a custom <code>NetworkProcessor</code> (see below), 			
	</li>
	<li><a href="api/cz/vutbr/web/css/CSSFactory.html#parse(java.lang.String, java.lang.String)" class="api"><code>StyleSheet parse(String fileName, String encoding)</code></a>,
			which internally transforms the
			<code>fileName</code> into an URL and		
	</li>
	<li><a href="api/cz/vutbr/web/css/CSSFactory.html#parseString(java.lang.String, java.net.URL)" class="api"><code>StyleSheet parseString(String css, URL base)</code></a>,
			which can be used to parse embedded CSS declarations that is declarations between the &lt;style&gt; tags.
	</li>
</ul><p>During the parsing process, the parser automatically imports all the style sheets referenced using the <code>@import</code>
rules. See the <a href="#media">Media</a> section for further reference about how to limit this behavior to certain
media only or disable it completely.</p><p>For obtaining the imported style sheets referenced by their URLs, it is possible to provide a custom implementation
开发者ID:sedlakr,项目名称:jStyleParser,代码行数:31,代码来源:manual.php

示例12: require_once

<?
require_once("include/xrai.inc");

if ($_GET["error"]) {
   $r = mail("inex@poleia.lip6.fr","X-Rai bug report",stripcslashes($_GET["error"]),"reply-to: inex@poleia.lip6.fr");
   header("location: $PHP_SELF?errorm=" . rawurlencode(stripcslashes("$_GET[error]")) . "&success=" . $r . "&whattodo=". rawurlencode(stripcslashes($_GET["whattodo"])));
   exit;  
}

make_header("Bug report");

if (!$_GET["success"]) print "<div class='error'>The email could not be send. Please copy the following error message and send it to <a href=\"mailto:$xrai_admin_email\">$xrai_admin_email</a></div>";

print '<div style="margin-left: auto; margin-right: auto; margin-top: 0.3cm; padding: 5px; background: #ffeeee; border: solid 1px red">The following error message was sent:<div><code>' . nl2br(htmlspecialchars(stripcslashes($_GET["errorm"]))) . '</code></div></div>';

if (!empty($_GET["whattodo"])) print '<div style="margin: 5px; ">' . stripcslashes($_GET["whattodo"]) . '</div>';

make_footer();
?>
开发者ID:BackupTheBerlios,项目名称:x-rai-svn,代码行数:19,代码来源:bug_report.php

示例13: make_manager

function make_manager($table)
{
    $sql = make_header($table);
    $rsfield = $GLOBALS['db']->getTableFields($GLOBALS['MAC']['db']['name'], $table);
    $i = 0;
    while ($rowfield = mysql_fetch_field($rsfield)) {
        $fs[$i] = trim($rowfield->name);
        $i++;
    }
    unset($rsfield);
    $fsd = $i - 1;
    $rsdata = $GLOBALS['db']->getAll('select * from ' . $table);
    $rscount = count($rsdata);
    $intable = 'INSERT INTO ' . $table . ' VALUES(';
    for ($j = 0; $j < $rscount; $j++) {
        $line = $intable;
        for ($k = 0; $k <= $fsd; $k++) {
            if ($k < $fsd) {
                $line .= "'" . mysql_escape_string($rsdata[$j][$fs[$k]]) . "',";
            } else {
                $line .= "'" . mysql_escape_string($rsdata[$j][$fs[$k]]) . "');\r\n";
            }
        }
        $sql .= $line;
    }
    unset($fs);
    unset($rsdata);
    return $sql;
}
开发者ID:klarclm,项目名称:sgv,代码行数:29,代码来源:admin_conn.php

示例14: include_once

<?

include_once("../inex.inc");
include_once("common.php");
make_header("Admin");

?>
<dl>
<dt><a href="add_pool.php">Add a pool</a></dt><dd>Add a new pool</dd>
<dt><a href="manage_pools.php">Manage pools</a></dt><dd>Update, edit, view statistics</dd>
</dl>

<?

make_footer();

?>
开发者ID:BackupTheBerlios,项目名称:x-rai-svn,代码行数:17,代码来源:index.php

示例15: session_start

<?php

session_start();
include '../phpfunction.php';
if ($_SESSION['user'] == 0) {
    header("Location: ../index.php");
}
echo "<html>";
echo make_header('../');
?>

<style>
.clr {
	clear: both;
	font-size: 0;
	height: 0;
}

#filelist {
	width: 50%;
	float: left;
	height: 500px;
	overflow-y: scroll;
}

#preview-wrapper {
	width: 50%;
	float: left;
	height: 500px;
}
开发者ID:xacobe,项目名称:WWU-CS-Virtual-Tour,代码行数:30,代码来源:manage.php


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