本文整理汇总了PHP中type函数的典型用法代码示例。如果您正苦于以下问题:PHP type函数的具体用法?PHP type怎么用?PHP type使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了type函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: do_method
function do_method($a, $v = null)
{
$p = $this->target ? $this->target : $this;
$args = optimize_args(func_get_args());
/*get callback*/
foreach ($args as $z) {
if (ispack($z) && type($z) == 'object') {
$cb = $z;
}
}
$methods = $this->methods($p);
if (isStr($a)) {
if (isIn($a, $methods)) {
$p->{$a}($v);
} else {
if (isset($cb)) {
$cb($p, array($a, $v));
} else {
$p->attr($a, $v);
}
}
} else {
while (list($i, $v_) = _each($args, $k)) {
if (isStr($i)) {
$this->do_method($i, $v_);
}
if (isDrw(OBJ($v_))) {
foreach ($v_ as $l => $v1) {
$this->do_method($l, $v1);
}
}
}
}
return $this;
}
开发者ID:hoangsoft90,项目名称:hw-sudoku-wordpress,代码行数:35,代码来源:hphp.php
示例2: clone_
/**
* Returns a deep copy of the given value. `Callable`s are not copied but returned by reference.
* ```php
* $data = (object) [
* 'content' => (object) ['name' => 'foo'],
* 'other' => 'value'
* ];
*
* $clonedData = clone_($data);
* $clonedData->content->name = 'bar';
*
* $clonedData; // stdClass({content: {name: 'bar'}, other: 'value'})
* $data; // stdClass({content: {name: 'foo'}, other: 'value'})
* ```
*
* @signature a -> a
* @param mixed $value
* @return mixed
*/
function clone_()
{
$clone = function ($value) {
switch (type($value)) {
case 'Null':
case 'Boolean':
case 'String':
case 'Function':
case 'Resource':
case 'Number':
return $value;
case 'ArrayObject':
case 'Array':
case 'List':
return map(clone_(), $value);
case 'Error':
case 'Stream':
case 'Object':
$result = clone $value;
foreach (keys($value) as $key) {
$result->{$key} = clone_($result->{$key});
}
return $result;
}
return $value;
};
return apply(curry($clone), func_get_args());
}
开发者ID:tarsana,项目名称:functional,代码行数:47,代码来源:object.php
示例3: of
/**
* Creates a new Stream with the provided $data.
* ```php
* Stream::of(1); // Stream(1)
* Stream::of(1, 'Hello'); // Stream([1, 'Hello'])
* Stream::of([1, 2, 3]); // Stream([1, 2, 3])
* ```
*
* @signature a -> Stream(a)
* @param mixed $data
* @return Stream
*/
public static function of($data)
{
$data = func_get_args();
if (count($data) == 1) {
$data = $data[0];
}
return new Stream($data, [], type($data));
}
开发者ID:tarsana,项目名称:functional,代码行数:20,代码来源:Stream.php
示例4: assign_link
function assign_link(&$o, $url = '', $targ = '_parent')
{
if (type(OBJ($o, false)) == 'a') {
_($o)->attr(array('href' => $url, 'target' => $targ));
} else {
$l = c_link($o, $url, $targ);
_($o)->parent()->replaceChild($o, $l);
$o = $l;
}
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:10,代码来源:hphp.plugin_Element.php
示例5: valid_datetime_object
function valid_datetime_object($t)
{
//only date
if (type($t) == '_Date') {
$y = $t->get_date();
} elseif (type($t) == 'DateTime') {
$y = $t;
}
if (isStr($t) && isDate($t)) {
$s = explode('-', $t);
$y = new DateTime();
$y->setDate($s[0], $s[1], $s[2]);
}
if (isset($y)) {
return $y;
} else {
return false;
}
}
开发者ID:hoangsoft90,项目名称:hw-sudoku-wordpress,代码行数:19,代码来源:hphp._Date.php
示例6: type
function type($fid = 0, $n = 0, $fstr)
{
$fstr .= ">" . $fid;
$n++;
//获取fid对应的分类
$ob = M("producttype");
$arr = $ob->where("fid={$fid}")->select();
/*
echo"<pre>";
echo $n;
var_dump($arr);
echo"</pre>";
*/
for ($i = 1; $i < $n; $i++) {
$kStr .= " ";
}
foreach ($arr as $v) {
$id = $v['id'];
$newFstr = substr($fstr, 2);
if ($n == 1) {
$str .= "<option value='{$newFstr}>{$id}>'>{$v['name']}</option>";
} else {
$str .= "<option value='{$newFstr}>{$id}>'>{$kStr}{$v['name']}</option>";
}
//查找$id是否有子分类,找到它的子分类对应的数组
$sarr = $ob->where("fid={$id}")->select();
/*echo"<pre>";
var_dump($arr);
echo"</pre>";*/
if (!empty($sarr) && is_array($sarr)) {
$str1 = type($id, $n, $fstr);
$str = $str . $str1;
}
}
return $str;
}
开发者ID:xiaoyueer98,项目名称:m-heimiwifi-com,代码行数:36,代码来源:common.php
示例7: time
require_once '../models/data/ItemInfo.php';
$des_name = time();
$im = new ItemInfo();
try {
$fp = fopen('./12345', 'r');
$data = array();
while (!feof($fp)) {
$line = fgets($fp);
$line = preg_replace('/\\t{1,}/', ' ', $line);
//去掉多个tab制表位
$line = preg_replace('/\\s{2,}/', ' ', $line);
//去掉多个空格
$l = explode(" ", $line);
$l[1] = gender($l[1]);
$l[2] = type($l[2]);
if ($l[0] == null) {
continue;
}
$data[] = $l;
}
$cons = '`id`,`itemGender`,`type`,`itemName`,`itemDate`';
$ln = null;
foreach ($data as $k => $v) {
$time = time();
array_walk($v, 'trim_arr');
$ln .= '(\'';
$ln .= join($v, '\',\'');
$ln .= '\',\'' . $time . '\'),';
}
$ln = trim($ln, ",") . ';';
开发者ID:bmchun,项目名称:sunset,代码行数:30,代码来源:import.php
示例8: string
function string()
{
type('is_string', func_get_args());
}
开发者ID:tfarla,项目名称:want-type,代码行数:4,代码来源:type.php
示例9: die
$sql = "SELECT * FROM users WHERE username = '{$username}' AND password = '{$password}'";
$result = @$database->query($sql) or die("No.");
// Huge error
// Cookies don't match and no session, so tell them to logout!
if ($database->num($result) < 1) {
session_destroy();
unset($username);
unset($password);
include $config['template_path'] . "header.php";
print_out(lang('error_with_cookies'), lang_parse('error_cookie_body', array($config['url_path'] . '/logout.php')), false);
} else {
if ($database->num($result) > 0) {
// Get the users data
$user_data = $database->fetch($result);
// What is this user classified as?
$type = type($user_data['username']);
// Tell us what they are
switch ($type) {
case 1:
$_SESSION['admin'] = true;
break;
case 2:
$_SESSION['moderator'] = true;
break;
case 3:
$_SESSION['banned'] = true;
break;
default:
break;
}
// Update their session
开发者ID:nijikokun,项目名称:NinkoBB,代码行数:31,代码来源:sessions.php
示例10: login
/**
* Signs user in based on username or email
* @global array
* @global resource
* @param boolean|string $username username or false
* @param boolean|string $email user email or false
* @param string $password user password
* @return int|boolean
*/
function login($username, $email = false, $password)
{
global $config, $database;
// Error codes
// 904 - empty email
// 905 - invalid email
// 906 - invalid username
// 907 - invalid chars in username
// 908 - banned [.]
// email is true?
if ($email) {
// is just true or null?
if (empty($email)) {
return 904;
}
// are we using email?
if (is_email($email)) {
// Encrypt the password
$password = md5($password);
// login before
load_hook('login_before');
// Query
$query = "SELECT * FROM `users` WHERE `email` = '{$email}' AND `password` = '{$password}' LIMIT 1";
// Return Data
$return = $database->query($query);
// Exists?
if ($database->num($return) > 0) {
// Finally return Results
$user_data = $database->fetch($return);
// Are they banned?
if ($user_data['banned']) {
return 908;
}
// What is this user classified as?
$type = type($user_data['username']);
// Tell us what they are
switch ($type) {
case 1:
$_SESSION['admin'] = true;
break;
case 2:
$_SESSION['moderator'] = true;
break;
case 3:
$_SESSION['banned'] = true;
break;
default:
break;
}
// logged in
load_hook('login_after');
// Update their session
$_SESSION['logged_in'] = true;
$_SESSION['user_id'] = $user_data['id'];
$_SESSION['user_name'] = $user_data['username'];
// Last seen
update_user($user_data['id'], false, 'last_seen', time());
// Set Cookie
if ($config['allow_cookies']) {
setcookie('login', "{$username}|{$password}", time() + 86400 * 365 * 2, $config['cookie_domain'], '.ninkobb.com');
}
} else {
return false;
}
} else {
// guess it wasn't a real one.
return 905;
}
} else {
// Was it empty?
if (empty($username)) {
return 906;
}
// Checking for invalid characters
if (!alpha($username, 'alpha-underscore')) {
return 907;
}
// Encrypting password
$password = md5($password);
// login before
load_hook('login_before');
// Query
$query = "SELECT * FROM `users` WHERE `username` = '{$username}' AND `password` = '{$password}' LIMIT 1";
// Return Data
$return = $database->query($query);
// Exists?
if ($database->num($return) > 0) {
// Finally return Results
$user_data = $database->fetch($return);
// Are they banned?
if ($user_data['banned']) {
//.........这里部分代码省略.........
开发者ID:nijikokun,项目名称:NinkoBB,代码行数:101,代码来源:user.php
示例11: isset
$n = isset($_GET['limit']) ? $_GET['limit'] : null;
$search = new Search();
$like = new UserLikeModel();
$re = $search->search($_GET['key'], $page, $uid, $n);
while ($line = mysql_fetch_array($re, MYSQL_ASSOC)) {
$line['islike'] = $like->checkUserLike($uid, $line['id']);
$line['likesum'] = $like->itemLikeSum($line['id']);
$data[] = $line;
}
echo $style->show(200, $data);
} elseif ($_GET['key'] && $_GET['type']) {
$data = array();
$uid = isset($_GET['uid']) ? $_GET['uid'] : null;
$page = isset($_GET['page']) ? $_GET['page'] : 1;
if (isset($_GET['type'])) {
$type = type($_GET['type']);
}
$search = new Search();
$like = new UserLikeModel();
$re = $search->search_admin($_GET['key'], $type, $page);
while ($line = mysql_fetch_array($re, MYSQL_ASSOC)) {
$line['islike'] = $like->checkUserLike($uid, $line['id']);
$line['likesum'] = $like->itemLikeSum($line['id']);
$data[] = $line;
}
echo $style->show(200, $data);
} else {
echo $style->show(400);
}
function type($type)
{
开发者ID:bmchun,项目名称:sunset,代码行数:31,代码来源:search.php
示例12: replaceChild
function replaceChild($new, $old = null)
{
if (!$this->more()) {
if (isDrw($new) || type($new) == 'DRW') {
while (list($i, $v) = _each($new, $k)) {
$this->replaceChild($i, $v);
}
}
if (isEle($new) && isEle($old)) {
$this->O->replaceChild($new, $old);
}
} else {
foreach ($this->O as $v) {
_($v)->replaceChild($new, $old);
}
}
return $this;
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:18,代码来源:hphp.class_Element.php
示例13: equals
/**
* Returns `true` if the two elements have the same type and are deeply equivalent.
* ```php
* $a = (object) ['a' => 1, 'b' => (object) ['c' => 'Hello'], 'd' => false];
* $b = (object) ['a' => 1, 'b' => (object) ['c' => 'Hi'], 'd' => false];
* $c = (object) ['a' => 1, 'b' => ['c' => 'Hello'], 'd' => false];
* equals(5, '5'); // false (should have the same type)
* equals([1, 2, 3], [1, 2, 3]); // true
* equals([1, 3, 2], [1, 2, 3]); // false (should have the same order)
* equals($a, $b); // false
* equals($a, $c); // false
* $b->b->c = 'Hello';
* equals($a, $b); // true
* ```
*
* @signature * -> * -> Boolean
* @param mixed $a
* @param mixed $b
* @return bool
*/
function equals()
{
$equals = function ($a, $b) {
$type = type($a);
if ($type != type($b)) {
return false;
}
switch ($type) {
case 'Null':
case 'Boolean':
case 'String':
case 'Number':
case 'Unknown':
case 'Function':
case 'Resource':
case 'Error':
case 'Stream':
return $a == $b;
case 'List':
$length = length($a);
return length($b) != $length ? false : 0 == $length ? true : equals(head($a), head($b)) && equals(tail($a), tail($b));
case 'Array':
case 'ArrayObject':
case 'Object':
return equals(keys($a), keys($b)) && equals(values($a), values($b));
}
};
return apply(curry($equals), func_get_args());
}
开发者ID:tarsana,项目名称:functional,代码行数:49,代码来源:operators.php
示例14: elementType
{
return "type {$argNum}";
}
/**
* element type of argument #$argNum
* @param mixed $argNum
* @return mixed
*/
function elementType($argNum)
{
return "elementType {$argNum}";
}
override(\array_shift(0), elementType(0));
override(\array_reverse(0), elementType(0));
override(\array_pop(0), elementType(0));
// override(\array_map(0), type(1));
override(\array_filter(0), type(0));
override(\array_reduce(0), elementType(0));
override(\current(0), elementType(0));
override(\reset(0), elementType(0));
override(\end(0), elementType(0));
override(\prev(0), elementType(0));
override(\next(0), elementType(0));
override(\iterator_to_array(0), type(0));
// override( \ServiceLocatorInterface::get(0),
// map( [
// "A" => \Exception::class,
// \ExampleFactory::EXAMPLE_B => ExampleB::class,
// \EXAMPLE_B => \ExampleB::class,
// '' => '@|\Iterator',
// ]));
开发者ID:artspb,项目名称:phpstorm-stubs,代码行数:31,代码来源:.phpstorm.meta.php
示例15: displayLobby
function displayLobby($id, $full = false, $ready = false, $rate = false)
{
$lobby = new lobby($id);
$sid = $lobby->lobbyserver($id);
$server = new Server($sid);
echo '<li class="lobby_panel" data-panel="lobby_tooltip-' . $lobby->id . '">
<img class="map_pic" src="theme/images/maps/' . $lobby->map . '.jpg">
<div class="panel_left">
<h1>' . $lobby->name . '</h1>
<span class="date">' . date('g:i a', strtotime($lobby->date)) . '</span>
<span class="map">' . $lobby->map . '</span>
<ul class="classes">
<li><img src="theme/images/class/scout.png" height="18"></li>
<li><img src="theme/images/class/soldier.png" height="18"></li>
<li><img src="theme/images/class/demo.png" height="18"></li>
<li><img src="theme/images/class/heavy.png" height="18"></li>
<li><img src="theme/images/class/sniper.png" height="18"></li>
<li><img src="theme/images/class/medic.png" height="18"></li>
</ul>
</div>
<div class="panel_right">
<span class="skillevel skill_higher">Division ' . $lobby->division . '</span>
<span class="matchtype">' . type($lobby->type) . '</span>
<span class="playercount"><span class="currentplayers">' . countPlayers($lobby->id) . '</span>/<span class="maxplayers">' . 2 * teamplayers($lobby->type) . '</span></span>
</div>
</li>';
if ($full) {
echo '<li class="lobby_tooltip_big" id="lobby_tooltip:' . $lobby->id . '">';
} else {
echo '<li class="lobby_tooltip" id="lobby_tooltip:' . $lobby->id . '">';
}
echo '
<ul class="blue_players">
<li class="teamname blu">BLU</li>';
if (!$ready && !$rate) {
echo $lobby->players_blu;
}
if ($ready && !$rate) {
echo displayLobbyPlayers($lobby->id, $lobby->type, 1, true, false);
}
if (!$ready && $rate) {
echo displayLobbyPlayers($lobby->id, $lobby->type, 1, false, true);
}
echo '
</ul>
<ul class="red_players">
<li class="teamname red">RED</li>';
if (!$ready && !$rate) {
echo $lobby->players_red;
}
if ($ready && !$rate) {
echo displayLobbyPlayers($lobby->id, $lobby->type, 2, true, false);
}
if (!$ready && $rate) {
echo displayLobbyPlayers($lobby->id, $lobby->type, 2, false, true);
}
echo '
</ul>';
if ($full) {
echo '
<h1 style="margin-top: 10px; margin-right: 5px;">Spectators:</h1>
<ul class="spec_players" style="margin-top: 10px; float: left;">' . $lobby->players_spec . '
</ul><h1 style="margin-top: 10px; margin-right: 5px; clear: left;">Info:</h1>
<ul style="margin-top: 10px; float: left;">
<li>Lobby started at 14:23 and has now been running for <span class="time_run">13</span> minutes.</li>
</ul>
</li>';
} else {
echo '<div class="lobby_info">
<h1>Gameserver</h1>
' . $server->showServer() . '' . ($_SESSION['id'] ? '<div class="button join" onclick="joinGame(' . $lobby->id . ')">Join</div>' : '') . '
</div>';
}
}
开发者ID:marat1803,项目名称:tf2matchmaking,代码行数:75,代码来源:class.lobby.php
示例16: toString
/**
* Converts a variable to its string value.
* ```php
* toString(53)); // '53'
* toString(true)); // 'true'
* toString(false)); // 'false'
* toString(null)); // 'null'
* toString('Hello World')); // '"Hello World"'
* toString([])); // '[]'
* toString(new \stdClass)); // '{}'
* toString(function(){})); // '[Function]'
* toString(Error::of('Ooops'))); // '[Error: Ooops]'
* toString(fopen('php://temp', 'r'))); // '[Resource]'
* toString(['hi', 'hello', 'yo'])); // '["hi", "hello", "yo"]'
* toString([
* 'object' => Stream::of(null),
* 'numbers' => [1, 2, 3],
* 'message'
* ]); // '{object: Stream(Null), numbers: [1, 2, 3], 0: "message"]'
* ```
*
* @signature * -> String
* @param mixed $something
* @return string
*/
function toString()
{
$toString = function ($something) {
switch (type($something)) {
case 'String':
return "\"{$something}\"";
break;
case 'Boolean':
return $something ? 'true' : 'false';
break;
case 'Null':
return 'null';
break;
case 'Number':
return (string) $something;
break;
case 'List':
return '[' . join(', ', map(toString(), $something)) . ']';
break;
case 'Error':
case 'Stream':
return $something->__toString();
case 'Object':
case 'Array':
return '{' . join(', ', map(function ($pair) {
return $pair[0] . ': ' . toString($pair[1]);
}, toPairs($something))) . '}';
default:
return '[' . type($something) . ']';
}
};
return apply(curry($toString), func_get_args());
}
开发者ID:tarsana,项目名称:functional,代码行数:58,代码来源:common.php
示例17: edytor
function edytor()
{
ob_end_clean();
echo '
<!DOCTYPE html>
<html>
<head>
<title>Edytowanie</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="css/apigui.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<style type="text/css">
* {
margin:0;
}
html,body {
width:auto;
min-width:0;
overflow:hidden;
}
body {
background:#60d4ff;
}
#header {
padding-top:5px;
background:#FFF;
box-shadow:0px 0px 5px #CCC;
}
#content {
color:#FFF;
margin:0;
}
#image {
position:absolute;
z-index:-2;
opacity:0.05;
width:100%;
}
td, th {
padding:3px;
font-size:16px;
text-shadow:1px 1px 0px #4190ad;
color:#FFF;
}
th { font-weight:bold; font-size:16px !important; font-family:Arial; }
td input {
font-size:16px !important;
}
#save {
position:absolute;
bottom:0;
left:0;
background:#fafafa;
padding:20px;
width:100%;
}
.notify_div, #notify {
width:360px !important;
text-align:center;
color:#2c2c2c;
text-shadow:#fffc7d;
}
#notify {
background:#fffec4;
border-color:#fffc80;
margin-left:-180px;
}
</style>
</head>
<body>
<div id="apigui">
';
$query = mysql_query("SELECT * FROM `tentego_img` WHERE `id`=" . $_GET['id']);
if (mysql_num_rows($query)) {
if (isset($_POST['save'])) {
if (mysql_query("UPDATE `tentego_img` SET `title`='" . htmlspecialchars($_POST['title'], ENT_QUOTES) . "', `cat`='" . $_POST['cat'] . "', `date`='" . $_POST['date'] . "', `src`='" . $_POST['src'] . "', `type`='" . $_POST['type'] . "', `source`='" . htmlspecialchars($_POST['source'], ENT_QUOTES) . "' WHERE `id`=" . $_GET['id'])) {
$query = mysql_query("SELECT * FROM `tentego_img` WHERE `id`=" . $_GET['id']);
kernel::make_notify("Zapisano.");
} else {
kernel::make_notify("Bład podczas zapisu.");
}
}
$img = mysql_fetch_array($query);
$date = new DateTime($img['date']);
function type($pattern, $array)
{
$type = array('Obrazek' => 'img', 'YouTube.com' => 'youtube', 'Vimeo' => 'vimeo');
$return = NULL;
foreach ($type as $name => $value) {
$text = str_replace("#NAME#", $name, $pattern);
if ($array['type'] == $value) {
$text = str_replace("#SELECTED#", ' selected="selected"', $text);
} else {
$text = str_replace("#SELECTED#", NULL, $text);
}
$text = str_replace("#TYPE#", $value, $text);
$return .= $text;
}
return $return;
//.........这里部分代码省略.........
开发者ID:roxio,项目名称:TenTego2,代码行数:101,代码来源:app_admin.php
示例18: SelectionGenerate
function SelectionGenerate($wpName, $queries, $attMap)
{
//echo PHP_EOL . '/*' . PHP_EOL;
//print_r($wpName);
//print_r($queries);
//print_r($attMap);
//echo PHP_EOL . '*/' . PHP_EOL;
?>
// module specific headers to allow separate compilation
#include "GLAData.h"
#include "Errors.h"
//+{"kind":"WPF", "name":"Pre-Processing", "action":"start"}
extern "C"
int SelectionPreProcessWorkFunc_<?php
echo $wpName;
?>
(WorkDescription& workDescription, ExecEngineData& result) {
SelectionPreProcessWD myWork;
myWork.swap(workDescription);
QueryExitContainer& queries = myWork.get_whichQueryExits();
QueryToGLASContMap & requiredStates = myWork.get_requiredStates();
QueryToGLAStateMap constStates;
<?php
cgDeclareQueryIDs($queries);
?>
<?php
foreach ($queries as $query => $info) {
$gf = $info['gf'];
if (!is_null($gf) && $gf->has_state()) {
$state = $gf->state();
if ($state->configurable()) {
$carg = $info['cargs'];
echo ' // JSON Configuration for query ' . queryName($query) . PHP_EOL;
$carg->init();
echo PHP_EOL;
}
// if gf const state is configurable
}
// if gf has state
}
//foreach query
?>
FOREACH_TWL(iter, queries) {
<?php
foreach ($queries as $query => $val) {
?>
if( iter.query == <?php
echo queryName($query);
?>
) {
<?php
if ($val['gf'] !== null) {
// This is a generalized filter
$gf = $val['gf'];
$given_states = $val['states'];
if ($gf->has_state()) {
$cstArgs = [];
$state = $gf->state();
// If the state is configurable, give it the JSON carg
if ($state->configurable()) {
$carg = $query['cargs'];
$cstArgs[] = $carg->name();
}
// if gf state is configurable
if (\count($given_states) > 0) {
?>
FATALIF(!requiredStates.IsThere(<?php
echo queryName($query);
?>
),
"No required states received for query that declared required states");
GLAStateContainer& givenStates = requiredStates.Find(<?php
echo queryName($query);
?>
);
givenStates.MoveToStart();
GLAPtr reqTemp;
<?php
foreach ($givenStates as $gs) {
$cstArgs[] = $gs->name();
?>
// Extract state from waypoint[<?php
echo $gs->waypoint();
?>
]
<?php
echo $gs->type();
?>
* <?php
echo $gs->name();
?>
= nullptr;
reqTemp.Swap(givenStates.Current());
FATALIF( reqTemp.get_glaType() != <?php
//.........这里部分代码省略.........
开发者ID:gokulp,项目名称:grokit,代码行数:101,代码来源:Selection.cc.php
示例19: type
echo "</select></td></tr>\n";
echo "<tr><td align=right>" . $t->translate("New Type Description") . " (255):</td><td><input type=\"TEXT\" name=\"new_description\" size=40 maxlength=255>\n";
echo "</td></tr>\n";
echo "<tr><td> </td>\n";
echo "<td><input type=\"submit\" value=\"" . $t->translate("Change") . "\">";
echo "</td></tr>\n";
echo "</form>\n";
echo "</table>\n";
echo "<BR>\n";
// Delete Type
$bs->box_strip($t->translate("Delete Type"));
echo "<form action=\"" . $sess->url("instyp.php") . "\" method=\"POST\">\n";
echo "<table border=0 cellspacing=0 cellpadding=3 width=100%>\n";
echo "<tr><td align=right width=30%>" . $t->translate("Type") . ":</td><td width=70%>\n";
echo "<select name=\"type\">\n";
type("");
// We select the first one to avoid having a blank line
echo "</select></td></tr>\n";
echo "</td></tr>\n";
echo "<tr><td> </td>\n";
echo "<input type=\"hidden\" name=\"del_type\" value=\"warning\">\n";
echo "<td><input type=\"submit\" value=\"" . $t->translate("Delete") . "\">";
echo "</td></tr>\n";
echo "</form>\n";
echo "</table>\n";
$bx->box_body_end();
$bx->box_end();
}
?>
<!-- end content -->
开发者ID:BackupTheBerlios,项目名称:docswell,代码行数:31,代码来源:admtyp.php
示例20: PHPExcel
$result['card_id'] = $user['card_id'];
$result['authorize_data'] = $user['authorize_data'];
$result['authorize_email'] = $user['authorize_email'];
}
}
}
$data[] = $result;
}
$results = $data;
$objPHPExcel = new PHPExcel();
$objPHPExcel->getProperties()->setCreator("Backoffice " . $site_title)->setLastModifiedBy("Backoffice " . $site_title)->setTitle("Listagem de utilizadores")->setSubject("Listagem de utilizadores")->setDescription("Listagem de utilizadores");
$objPHPExcel->getActiveSheet()->setTitle('Simple');
$line = 1;
$letter = 0;
$objPHPExcel->setActiveSheetIndex(0)->setCellValue($letters[$letter++] . $line, 'link')->setCellValue($letters[$letter++] . $line, 'tipo')->setCellValue($letters[$letter++] . $line, 'tipo social')->setCellValue($letters[$letter++] . $line, 'votos')->setCellValue($letters[$letter++] . $line, 'nome')->setCellValue($letters[$letter++] . $line, 'email')->setCellValue($letters[$letter++] . $line, 'telefone')->setCellValue($letters[$letter++] . $line, 'cartão continente')->setCellValue($letters[$letter++] . $line, 'autorizou dados')->setCellValue($letters[$letter++] . $line, 'autorizou envio de email')->setCellValue($letters[$letter++] . $line, 'estado')->setCellValue($letters[$letter++] . $line, 'data de criação');
if ($results != null) {
foreach ($results as $row) {
$letter = 0;
$line++;
$objPHPExcel->setActiveSheetIndex(0)->setCellValue($letters[$letter++] . $line, "http://" . $_SERVER['SERVER_NAME'] . str_replace('/backoffice', '', $path) . '/#galeria/' . $row['slug'])->setCellValue($letters[$letter++] . $line, itemType($row['type']))->setCellValue($letters[$letter++] . $line, type($row['social_id']))->setCellValue($letters[$letter++] . $line, $row['votes'])->setCellValue($letters[$letter++] . $line, $row['name'])->setCellValue($letters[$letter++] . $line, $row['email'])->setCellValue($letters[$letter++] . $line, $row['phone'])->setCellValue($letters[$letter++] . $line, $row['card_id'])->setCellValue($letters[$letter++] . $line, intval($row['authorize_data']) ? "Sim" : "Não")->setCellValue($letters[$letter++] . $line, intval($row['authorize_email']) ? "Sim" : "Não")->setCellValue($letters[$letter++] . $line, intval($row['status']) ? "Ativo" : "Inativo")->setCellValue($letters[$letter++] . $line, $row['create_date']);
}
}
// Redirect output to a client’s web browser (Excel5)
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="' . date('Y-m-d H:i') . '_continentetv.xls"');
header('Cache-Control: max-age=1');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
} catch (Exception $e) {
echo $e->getMessage();
}
开发者ID:bimbojones,项目名称:QueIncrivel,代码行数:31,代码来源:list.php
注:本文中的type函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论