• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getname函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getname

function getname($supercode, $mysqli)
{
    $fullname = '';
    $sql = "select * from channel where code='{$supercode}'";
    $res = $mysqli->query($sql);
    $row = $res->fetch_assoc();
    $fullname .= $row['cname'] . ",";
    if ($row['code'] != $row['supercode']) {
        getname($row['supercode'], $mysqli);
    }
    return $fullname;
}
开发者ID:ZSShang,项目名称:mylearn,代码行数:12,代码来源:shcms_channel.php


示例2: stripslashes

            return stripslashes($matches[1][0]);
        }
    }
}
if (isset($_POST["file"])) {
    $result = '';
    if ($config['total'] != 0) {
        $used = $db->ExecuteSQL(sprintf('SELECT SUM(`size`) AS `sum` FROM `file` WHERE `owner` = \'%s\' AND `recycle` = \'0\'', $db->SecureData($_SESSION["username"])));
        if ($used[0]['sum'] >= $config["total"] * 1000 * 1000) {
            $result = "totalout";
        }
    }
    $file = @file_get_contents($_POST["file"]);
    $header = @get_headers($_POST["file"], 1);
    if ($file !== false && stripos($header[0], '200') !== false) {
        $name = getname($_POST["file"]);
        if (strlen($file) == 0) {
            // 只有當無法正常偵測大小時才使用 header ,因為header可能被偽造
            $size = $header["Content-Length"];
        } else {
            $size = strlen($file);
        }
        if ($config['size'] != 0) {
            if ($size > $config["size"] * 1000 * 1000) {
                $result = "sizeout";
            }
        }
        /* Create Key */
        $passphrase['a'] = sha1(md5(mt_rand() . uniqid()));
        $passphrase['b'] = $_SESSION['password'];
        $iv = substr(md5("<X" . $passphrase['b'], true), 0, 8);
开发者ID:BirkhoffLee,项目名称:allendisk,代码行数:31,代码来源:remotedownload.php


示例3: getname

<div class="panel panel-primary">
	<div class="panel-heading" style="background: #56892E;">
		<h3 class="panel-title" align="center">QQ查询</h3>
	</div>
	<ul align="center" class="list-group" style="list-style:none;">
		<li class="list-group-item">
    <form action="index.php" method="get"><input type="hidden" name="mod" value="wall">
    请输入要查询的QQ号码:<input type="text" class="form-control" name="q"><br><input type="submit" class="btn btn-primary btn-block" value="查询">
    </form>
<br>
	</ul>
</div>
';
} else {
    $q = $_GET['q'];
    $name = getname($q);
    //$panduan=qqpanduan($q);
    echo '
<div class="panel panel-primary" style="max-width:680px;">
	<div class="panel-heading" style="background: #56892E;">
		<h3 class="panel-title" align="center">' . $name . '的信息</h3>
	</div>
	<ul align="center" class="list-group" style="list-style:none;">
		<li class="list-group-item"><b><font color=green>QQ:' . $q . '</b></font><li>
		<li class="list-group-item"><b><font color=bule>昵称:' . $name . '</b></font><li>
		<li class="list-group-item"><b><font color=red>状态:<img src="http://wpa.qq.com/pa?p=9:' . $q . ':5"></b></font><li>
		<li class="list-group-item"><img src="http://q1.qlogo.cn/g?b=qq&nk=' . $q . '&s=100&t=' . time() . '"><li>
		<li class="list-group-item"><img src="http://qqshow-user.tencent.com/' . $q . '/22/00/1.gif?fr=mobileqq"><li>
		<li class="list-group-item"><a class="btn btn-s-md btn-info btn-rounded btn-block" value="发送消息" target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=' . $q . '&amp;site=qq&amp;menu=yes">发送消息</a><li>
		<li class="list-group-item"><a class="btn btn-s-md btn-info btn-rounded btn-block" value="加为好友" target="_blank" href="tencent://AddContact/?fromId=45&fromSubId=1&subcmd=all&uin=' . $q . '&website">加为好友</a><li>
		<li class="list-group-item"><a class="btn btn-s-md btn-primary btn-rounded btn-block" value="浏览QQ空间" target="_blank" href="http://user.qzone.qq.com/' . $q . '">浏览QQ空间</a><li>
开发者ID:sembrono,项目名称:mz,代码行数:31,代码来源:wall.php


示例4: exit

    } else {
        $ggcon = 'document.write(unescape("' . $ggdm . '"));';
    }
    $ggcon1 = '<?php exit();?>' . "\r\n" . $ggtitle . "\r\n" . $ggdm . "\r\n" . $ggclass . "\r\n" . $ggwidth . "\r\n" . $ggheight . "\r\n" . gnt() . "\r\n" . $ggzu . "\r\n" . $ggtj . "\r\n" . $ggjfclass . "\r\n" . $gglei;
    file_put_contents($path, $ggcon) or die('出错啦!无法创建.js文件!请将程序目录和所有文件的文件权限设置属性0755或0777。');
    file_put_contents($path1, $ggcon1) or die('出错啦!无法创建.php文件!请将程序目录和所有文件的文件权限设置属性0755或0777。');
    $gglist = file($path2);
    if (!is_array($gglist)) {
        $gglist[] = '';
    }
    array_shift($gglist);
    array_unshift($gglist, $thread . '-' . $ontid . "\r\n");
    array_unshift($gglist, '<?php exit();?>' . "\r\n");
    file_put_contents($path2, $gglist) or die('出错啦!无法创建.php文件!请将程序目录和所有文件的文件权限设置属性0755或0777。');
    $conn = new mysql();
    $conn->inoplog('添加广告', $ontid, 1, getname());
    die('1');
}
///////////////////////////
$ggiftj = $_COOKIE['ggiftj'];
$gglei = unescape($_COOKIE['gglei']);
$ggzu = unescape($_COOKIE['ggzu']);
$ggleil = file_get_contents($datadir . '/ggleilist.php');
$ggll = explode("\r\n", $ggleil);
array_shift($ggll);
$ggleilist = '';
foreach ($ggll as $value) {
    if ($value) {
        if ($value == $gglei) {
            $ggleilist .= '<option value="' . htmlspecialchars($value) . '" title="' . htmlspecialchars($value) . '" selected="selected">' . htmlspecialchars(cutstr($value, 10)) . '</option>';
        } else {
开发者ID:nomagame,项目名称:ZiFeiYu-Management-System,代码行数:31,代码来源:addgg.php


示例5: str_replace

            $content1 = str_replace($gid . "\r\n", '', $content1);
            $content .= $gid . "\r\n";
        }
    }
    file_put_contents($file, $content);
    file_put_contents($file1, $content1);
    $conn->inoplog('还原广告位', $gids, 1, getname());
    die('1');
}
///////////////////////////
if ($menu == 'delggwtrue') {
    if (!$gids) {
        die('出错啦!gids为空!你让我删谁?');
    }
    $arraygid = explode(' ', $gids);
    $file = $datadir . '/ggwrecyclelist.php';
    $content = file_get_contents($file);
    foreach ($arraygid as $gid) {
        if (strlen($gid) == strlen($ggwthread) + 15) {
            $path = $datadir . '/' . $gid . '.jsrecycle';
            $path1 = $datadir . '/' . $gid . '.phprecycle';
            unlink($path) or die($gid . '删除错误!');
            unlink($path1) or die($gid . '删除错误!');
            $content = str_replace($gid . "\r\n", '', $content);
        }
    }
    file_put_contents($file, $content);
    $conn->inoplog('彻底删除广告位', $gids, 1, getname());
    die('1');
}
///////////////////////////
开发者ID:nomagame,项目名称:ZiFeiYu-Management-System,代码行数:31,代码来源:delggw.php


示例6: insql

    $ggwlei = insql($_POST['ggwlei']);
    $ggwzu = insql($_POST['ggwzu']);
    $gid = insql($_POST['gid']);
    $gtime = insql($_POST['gtime']);
    if (!$ggwtitle) {
        die('标题不能为空!');
    }
    require 'func.gg.php';
    $path = $datadir . '/' . $gid . '.js';
    $path1 = $datadir . '/' . $gid . '.php';
    $ggwcon = ggwtojs($gid, $xzggcl, $ggwwidth, $ggwheight, $bjgg, $ggwclass);
    $ggwcon1 = '<?php exit();?>' . "\r\n" . $gtime . "\r\n" . $ggwtitle . "\r\n" . $ggwclass . "\r\n" . $ggwwidth . "\r\n" . $ggwheight . "\r\n" . $xzggcl . "\r\n" . $bjgg . "\r\n" . $ggwzu . "\r\n" . $ggwlei;
    file_put_contents($path, $ggwcon) or die('出错啦!无法创建.js文件!请将程序目录和所有文件的文件权限设置属性0755或0777。');
    file_put_contents($path1, $ggwcon1) or die('出错啦!无法创建.php文件!请将程序目录和所有文件的文件权限设置属性0755或0777。');
    $conn = new mysql();
    $conn->inoplog('修改广告位', $gid, 1, getname());
    die('1');
}
///////////////////////////
$ggwleil = file_get_contents($datadir . '/ggwleilist.php');
$ggwll = explode("\r\n", $ggwleil);
array_shift($ggwll);
$ggwleilist = '';
foreach ($ggwll as $value) {
    if ($value) {
        if ($value == $arrayd[8]) {
            $ggwleilist .= '<option value="' . htmlspecialchars($value) . '" title="' . htmlspecialchars($value) . '" selected="selected">' . htmlspecialchars(cutstr($value, 10)) . '</option>';
        } else {
            $ggwleilist .= '<option value="' . htmlspecialchars($value) . '" title="' . htmlspecialchars($value) . '">' . htmlspecialchars(cutstr($value, 10)) . '</option>';
        }
    }
开发者ID:nomagame,项目名称:ZiFeiYu-Management-System,代码行数:31,代码来源:editggw.php


示例7: explode

#   copyright-notice must be displayed on the website   #
#              where this script is used.               #
#                                                       #
#    See readme.htm for further copyright information   #
#     IF YOU USE THIS SCRIPT, YOU ACCEPT THESE TERMS    #
#########################################################
#########################################
#               DETAILS                 #
#########################################
if ($_GET['pn_go'] == 'details') {
    /* Ausgabe des betreffenden Newseintrags */
    for ($i = 0; $i < $zeilen; $i++) {
        $eintrag = explode('§', $zeile[$i]);
        if ($eintrag[0] == $_GET['id']) {
            $datum = formatdate($eintrag[6], $dateformat);
            $eintrag[1] = getname($eintrag[1], 'news/inc/pn_userdata.php');
            $eintrag[2] = formattext($eintrag[2], $smilies, $smiliespath, $myBoardCodeTags, $texthtml);
            $eintrag[3] = formattext($eintrag[3], $smilies, $smiliespath, $myBoardCodeTags, $texthtml);
            if ($eintrag[4] != '') {
                $eintrag[4] = formattext($eintrag[4], $smilies, $smiliespath, $myBoardCodeTags, $texthtml);
                $eintrag[3] = $eintrag[3] . '<br /><br /><b>More:</b><br />' . $eintrag[4];
            }
            /* Kategorie-System */
            if ($showcat == 'yes') {
                $eintrag[5] = getcat($eintrag[5], 'news/inc/pn_categories.dat', 'catpics', $catpics);
            } else {
                $eintrag[5] = '';
            }
            /* ---------------- */
            $commentscount = commentscount($eintrag[0]);
            $comments = '<a href="' . $_SERVER['PHP_SELF'] . '?pn_go=details&id=' . $eintrag[0] . $params . '">Comments (' . $commentscount . ')</a>';
开发者ID:Juuro,项目名称:Dreamapp-Website,代码行数:31,代码来源:comments.php


示例8: is_default_thumb

/**
 * Function used to check weather give thumb is deafult or not
 */
function is_default_thumb($i)
{
    if (getname($i) == 'processing.jpg') {
        return true;
    } else {
        return false;
    }
}
开发者ID:reactvideos,项目名称:Website,代码行数:11,代码来源:functions_video.php


示例9: file

    $focontent = file($fofile);
    array_shift($focontent);
    $focontent[] = $foname . ' ' . $fourl . "\r\n";
    array_unshift($focontent, '<?php exit();?>' . "\r\n");
    file_put_contents($fofile, $focontent) or die($fofile . ' 禁止写入!');
    die('1');
} elseif ($menu == 'editfo') {
    $oldfo = insql($_REQUEST['oldfo']);
    $newfoname = insql($_REQUEST['newfoname']);
    $newfourl = insql($_REQUEST['newfourl']);
    $fofile = $datadir . '/fo.' . md5(getname()) . '.php';
    $focontent = file($fofile);
    array_shift($focontent);
    $folist = '<?php exit();?>' . "\r\n";
    foreach ($focontent as $value) {
        $foarray = explode(' ', $value);
        if ($foarray[0] == $oldfo) {
            $folist .= $newfoname . ' ' . $newfourl . "\r\n";
        } else {
            $folist .= $value;
        }
    }
    file_put_contents($fofile, $folist) or die($fofile . ' 禁止写入!');
    die('1');
} elseif ($menu == 'delfo') {
    $fov = insql($_REQUEST['fov']);
    $fofile = $datadir . '/fo.' . md5(getname()) . '.php';
    $folist = '<?php exit();?>' . "\r\n" . $fov;
    file_put_contents($fofile, $folist) or die($fofile . ' 禁止写入!');
    die('1');
}
开发者ID:nomagame,项目名称:ZiFeiYu-Management-System,代码行数:31,代码来源:main.02.php


示例10: exit

    $yhznr = '<?php exit();?>' . "\r\n" . $yhzname . "\r\n" . $funcselect;
    file_put_contents($rankfile, $yhznr) or die('出错啦!' . $rankfile . ' 无法修改!请将程序目录和文件的文件权限设置属性0755或0777。');
    $conn = new mysql();
    $conn->inoplog('修改用户组', $rank, 1, getname());
    die('1');
    /////////////////////
} elseif ($_REQUEST['menu'] == 'delyhz') {
    /////////////////////
    $rank = htmlspecialchars(insql($_REQUEST['rank']));
    $rankfile = $datadir . '/access/' . $rank . '.access.php';
    if (!is_file($rankfile)) {
        die('用户组 ' . $rank . ' 不存在,删除失败!');
    }
    unlink($rankfile) or die('出错啦!' . $rankfile . ' 无法删除!请将程序目录和文件的文件权限设置属性0755或0777。');
    $conn = new mysql();
    $conn->inoplog('删除用户组', $rank, 1, getname());
    die('1');
    /////////////////////
} else {
    /////////////////////
    $subadminlist = '';
    foreach ($subadmin as $key => $value) {
        $accessdata = file($datadir . '/access/' . $value[1] . '.access.php');
        array_shift($accessdata);
        $zuname = htmlspecialchars(rtrim(array_shift($accessdata)));
        $subadminlist .= '<tr class="list">';
        $subadminlist .= '<td class="ui-widget-content uitd ct">' . htmlspecialchars($key) . '</td>';
        $subadminlist .= '<td class="ui-widget-content uitd ct">' . $zuname . '</td>';
        $subadminlist .= '<td class="ui-widget-content uitd ct"><button type="button" class="button editsa" value="' . htmlspecialchars($value[1]) . '" title="修改此管理员属性" />修改</button> <button type="button" class="button delsa" value="' . htmlspecialchars($key) . '" title="删除此管理员" />删除</button></td>';
        $subadminlist .= '</tr>';
    }
开发者ID:nomagame,项目名称:ZiFeiYu-Management-System,代码行数:31,代码来源:sadm.php


示例11: getname

    } else {
        ?>
							<div class="msgbox1">
								<img src="images/alert.png" style="height: 50px;float: left; margin-right:1%;"/><br/><?php 
        echo $msg;
        ?>
							</div>
				<?php 
    }
}
$qisco = $db->prepare('select * from `collaborate_request` where `user`=? and `status`=?');
$qisco->execute(array($id, 0));
$risco_count = $qisco->rowCount();
$risco = $qisco->fetch();
if ($risco_count > 0) {
    $ow = getname($risco['owner']);
    ?>
				<div class="msgbox">
								<img src="images/message.png" style="height: 50px;float: left; margin-right:1%;"/><br/><?php 
    echo $ow;
    ?>
 has invited you to join his account. Please accept this request to start collaborating.
								<br/>
								<input type="button" class="viewbutton2" value="Accept" style="background:#2e7317;" onclick="acceptrequest(<?php 
    echo $risco['id'];
    ?>
);"/> &nbsp; &nbsp; <input type="button" class="viewbutton2" value="Reject" style="background: rgb(230, 129, 162);" onclick="rejectrequest(<?php 
    echo $risco['id'];
    ?>
);"/>
				</div>
开发者ID:jyotiprava,项目名称:45serverbackup,代码行数:31,代码来源:myprofile.php


示例12: function

                'echarts/chart/k',
				'echarts/chart/line',
				'echarts/chart/bar'     
            ],			
        function (ec) {
                
            var myChart1 = ec.init(document.getElementById('main'));
            var myChart2 = ec.init(document.getElementById('main2'));
            var myChart3 = ec.init(document.getElementById('main3'));
            var myChart4 = ec.init(document.getElementById('main4'));
          
            //呈現股價、MA線*3
            option1 = {
                title : {
                    text: <?php 
getname($Stockvisble);
?>
                },
                tooltip : {
                    trigger: 'axis',
                    showDelay: 0,
                    formatter: function (params) {
                            var res = params[0].name;
                            for (var i = params.length - 1; i >= 0; i--) {
                                if (params[i].value instanceof Array) {
                                    res += '<br/>' + params[i].seriesName;
                                    res += '<br/>開盤 : ' + params[i].value[0] + '  最高: ' + params[i].value[3];
                                    res += '<br/>收盤 : ' + params[i].value[1] + '  最低 : ' + params[i].value[2];
                                }
                                else
                                {
开发者ID:r567tw,项目名称:Fundin,代码行数:31,代码来源:program.php


示例13: handlestr

   </div>
   <div class="panel-body"><h4>
<?php 
echo handlestr($sub['forum_content']);
?>
</h4>
   </div>
</div>
   <?php 
if (isset($res) && $res != null) {
    ?>
   <?php 
    for ($i = 0; $i < count($res); ++$i) {
        ?>
   <span class="label label-primary"><?php 
        echo getname($i + 1);
        ?>
</span>
   <div name="<?php 
        echo $res[$i]['thread_id'];
        ?>
" class="panel panel-default">

   <div class="panel-body"><h4>
<?php 
        echo handlestr($res[$i]['thread_content']);
        ?>
</h4>
   </div>
   <div class="panel-footer pull-right">
   <?php 
开发者ID:niehao100,项目名称:thedc17_web,代码行数:31,代码来源:thread.php


示例14: getname

images/no-photo.png'">
								<div><?php 
                echo $employee["name"] . ' ' . $employee["Sname"];
                ?>
<div class="small"><?php 
                echo $employee["DirectorateInitials"];
                ?>
</div></div>
							</div>
							<div class="content-nominate">
								<p>Belief: <?php 
                echo $employee["BeliefID"];
                ?>
</p>
								<p>Nominated By:<br><b><?php 
                echo getname($employee["NominatorEmpNum"]);
                ?>
</b></p>
							</div>
							<span id="wall<?php 
                echo $employee["ID"];
                ?>
Text" class="showbehaviour hidden mCustomScrollbar height260" data-mcs-theme="dark-2">
								<?php 
                echo $employee["personalMessage"];
                ?>
							</span>
						</div>
					</div>
				<?php 
            }
开发者ID:DbyD,项目名称:cruk,代码行数:31,代码来源:index.php


示例15: insql

////////////////////////////
if ($menu == 'deluploadfile') {
    $fids = insql($_POST['fids']);
    if (!$fids) {
        die('出错啦!目标为空!你让我删谁?');
    }
    $dir = $datadir . '/updata/';
    $arrayfid = explode(' ', $fids);
    foreach ($arrayfid as $fid) {
        $fidclass = explode('.', $fid);
        if (is_numeric($fidclass[0]) && strlen($fidclass[0]) == 14) {
            unlink($dir . $fid) or die($fid . "删除错误!请确认属性是否设置正确!");
        }
    }
    $conn = new mysql();
    $conn->inoplog('删除上传广告文件', $fids, 1, getname());
    die('1');
}
////////////////////////////
$desc = insql($_REQUEST['desc']);
$limit = insql($_REQUEST['limit']);
$page = insql($_REQUEST['page']);
$desc = $desc ? '' : 'DESC';
$limit = is_numeric($limit) && $limit > 1 ? $limit : 30;
$page = is_numeric($page) && $page > 1 ? $page : 1;
$upath = $datadir . '/updata';
$upurl = $amsurl . $upath;
$files = getfiles($upath);
if ($desc) {
    rsort($files);
} else {
开发者ID:nomagame,项目名称:ZiFeiYu-Management-System,代码行数:31,代码来源:upload_list.php


示例16: delete_from_activity_action_posted

    //delete_from_activity_action_posted($activity_posted_info[0][1]); //mno
    delete_from_activity_action_posted($activity_posted_info[0][4]);
    //plno
    delete_from_postedlooks($activity_posted_info[0][4]);
    //plno
    delete_from_postlook_a_look_folder($_POST['img']);
    //delete in image folder
}
$activity_posted = select('activity', 6, array('action', 'Posted'), 'order by _table_id desc', array($start, $limit));
// for ($i=0; $i < count($activity_posted); $i++) {
// 	echo $activity_posted[$i][4]."<br>";
// }
// echo "total result is = ".count($activity_posted)."<br>";
for ($i = 0; $i < count($activity_posted); $i++) {
    $i1 = $i + 1;
    echo "\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<img title='Owner: " . getname($activity_posted[$i][4]) . " , Posted on: " . $activity_posted[$i][5] . "' class='img' src='../images/members/posted looks/" . $activity_posted[$i][4] . ".jpg'>\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t<table border=0>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t<form onsubmit=\"return deletes('" . getname($activity_posted[$i][4]) . "')\" method='POST' >\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input style='display:none' type='text' name='img' value='" . $activity_posted[$i][4] . "'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input class='delete' title='Do you want to delete this look?' type = 'submit' value='delete' />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t\t\t\t</td><td><p class=desc>Owner: " . getname($activity_posted[$i][4]) . " <br>Posted on: " . $activity_posted[$i][5] . "</p></td>\n\t\t\t\t\t\t\t\t\t\t\t\t";
    echo "\n\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t</td>\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t ";
    if ($i1 % 5 == 0) {
        echo "<tr>";
    }
}
/*
	function getname($plno){ 
								 
		$activity_posted_info=select_w_2('activity',6,array('action','Posted','_table_id',$plno),'and');
		// print_r($activity_posted_info);
		// return $fullname;
		$fs_members_info =select('fs_members',5,array('mno',$activity_posted_info[0][1]));
		// print_r($fs_members_info);
		return $fs_members_info[0][3].' '.$fs_members_info[0][1];
		
开发者ID:jesus143,项目名称:fs-dev,代码行数:30,代码来源:viewlooks.php


示例17: getdata

function getdata($year, $month, $agentids)
{
    $agentid = explode("|", $agentids);
    $maxdays = $_GET["maxdays"];
    $firstday = date("w", mktime(0, 0, 0, $month, 1, $year));
    $mysqli = new mysqli(DBSERVER, DBUSER, DBPWD, DB);
    ////set the query
    $arr = array();
    foreach ($agentid as &$id) {
        for ($i = 1; $i <= 31; $i++) {
            $arr["ha_" . $id . "_" . $i] = "";
        }
        for ($i = 1; $i <= 31; $i++) {
            $arr["hd_" . $id . "_" . $i] = "";
        }
    }
    foreach ($agentid as &$id) {
        $query = sprintf("SELECT * FROM `presence` WHERE `year`='%s' AND `month`='%s' AND `agentid`='%s' ORDER BY `type`,`agentid`,ABS(`day`)", $year, $month, $id);
        $result = $mysqli->query($query);
        if ($result) {
            while ($row = $result->fetch_object()) {
                $idtag = $row->type . "_" . $row->agentid . "_" . $row->day;
                $arr[$idtag] = $row->value;
                //$xml .= "<data idtag='$idtag'>".$row->value."</data>";
            }
        } else {
            echo $mysqli->error;
        }
        $result->close();
    }
    $mysqli->close();
    //print_r($arr);
    foreach ($agentid as &$id) {
        $j = $firstday;
        $tt = $_GET[$id];
        $ar_agent = getname($id);
        $output .= "<Row ss:AutoFitHeight=\"0\" ss:Height=\"29.988\"><Cell ss:StyleID=\"ce7\"><Data ss:Type=\"String\">" . $ar_agent[0] . "</Data></Cell><Cell ss:StyleID=\"ce19\"><Data ss:Type=\"String\">HA</Data></Cell>";
        for ($i = 1; $i <= $maxdays; $i++) {
            if ($j == 0 || $j == 6) {
                $style = "ce6";
            } else {
                $style = "ce28";
            }
            $output .= "<Cell ss:StyleID=\"{$style}\" id=\"ha_" . $id . "_" . $i . "\"><Data ss:Type=\"String\">" . $arr["ha_" . $id . "_" . $i] . "</Data></Cell>";
            if ($j == 6) {
                $j = 0;
            } else {
                $j++;
            }
        }
        $output .= "<Cell ss:StyleID=\"ce51\" ss:MergeDown=\"1\"><Data ss:Type=\"String\">{$tt}</Data></Cell><Cell ss:StyleID=\"ce58\" ss:MergeDown=\"1\" /><Cell ss:StyleID=\"ce58\" ss:MergeDown=\"1\" /></Row>";
        $output .= "<Row ss:AutoFitHeight=\"0\" ss:Height=\"29.988\"><Cell ss:StyleID=\"ce8\"><Data ss:Type=\"String\">" . $ar_agent[1] . "</Data></Cell><Cell ss:StyleID=\"ce19\"><Data ss:Type=\"String\">HD</Data></Cell>";
        $j = $firstday;
        for ($i = 1; $i <= $maxdays; $i++) {
            if ($j == 0 || $j == 6) {
                $style = "ce6";
            } else {
                $style = "ce28";
            }
            $output .= "<Cell ss:StyleID=\"{$style}\" id=\"hd_" . $id . "_" . $i . "\"><Data ss:Type=\"String\">" . $arr["hd_" . $id . "_" . $i] . "</Data></Cell>";
            if ($j == 6) {
                $j = 0;
            } else {
                $j++;
            }
        }
        $output .= "</Row>";
    }
    return $output;
}
开发者ID:BGCX067,项目名称:faaa-presence-svn-to-git,代码行数:70,代码来源:extract_getdata.php


示例18: while

                                             while ($row1 = mysql_fetch_assoc($query1)) {
                                                 $arr = array("label" => $row1['name'], "id" => $row1['id'], "name" => $row1['name'], "type" => $row1['type']);
                                                 array_push($reply, $arr);
                                             }
                                         } else {
                                             if ($type == "solution") {
                                                 $type1 = get_type_id($type);
                                                 $sql1 = "SELECT * FROM pkn_name WHERE (type='{$type1}' AND name LIKE '{$term}') ORDER BY name ASC";
                                                 // lay id name
                                                 $query1 = mysql_query($sql1);
                                                 while ($row1 = mysql_fetch_assoc($query1)) {
                                                     $sql2 = "SELECT * FROM {$table} WHERE name = '{$row1['id']}'";
                                                     // lay id name
                                                     $query2 = mysql_query($sql2);
                                                     while ($row2 = mysql_fetch_assoc($query2)) {
                                                         $arr = array("label" => getname($row2['name']), "id" => $row2['id'], "name" => getname($row2['name']), "units" => get_formula_units($row2['id']), "unitsname" => get_obj_name("pkn_units", get_formula_units($row2['id'])));
                                                         array_push($reply, $arr);
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:binhpham1909,项目名称:webpkn,代码行数:31,代码来源:autocomplete.php


示例19: getname

                <div class='btn-group-vertical' role='group' aria-label='refBButtons'>
                  <div class="button-decoration">
                    <button type="button" class="btn btn-bets" onClick="calcScore(10, '2', time, '<?php 
echo getname($Record, "Right");
?>
')">$10</button>
                  </div>
                  <div class="button-decoration">
                    <button type="button" class="btn btn-bets" onClick="calcScore(50, '2', time, '<?php 
echo getname($Record, "Right");
?>
')">$50</button>
                  </div>
                  <div class="button-decoration">
                    <button type="button" class="btn btn-bets" onClick="calcScore(100, '2', time, '<?php 
echo getname($Record, "Right");
?>
')">$100</button>
                </div>
<!-- =======
                  <div class="button-decoration">
                    <button type="button" class="btn btn-bets" onClick="calcScore(100, 'B', time, '<?php 
echo $answer;
?>
')">$100</button>
                  </div>
                  <div class="button-decoration">
                    <button type="button" class="btn btn-bets" onClick="calcScore(80, 'B', time, '<?php 
echo $answer;
?>
')">$80</button>
开发者ID:smashleynguyen,项目名称:smithsonian-emammal,代码行数:31,代码来源:game.php


示例20: file_get_contents

    $path1 = $datadir . '/ggtemplist.php';
    $ggtl = file_get_contents($path1);
    $ggtl = str_replace($selectggmb . "\r\n", '', $ggtl);
    file_put_contents($path1, $ggtl) or die('出错啦!无法修改.php文件!请将程序目录和所有文件的文件权限设置属性0755或0777。');
    $conn = new mysql();
    $conn->inoplog('删除广告模板', $selectggmb, 1, getname());
    die('1');
    /////////////////////
} elseif ($_REQUEST['menu'] == 'renewitem') {
    /////////////////////
    $itemlist = htmlspecialchars(insql($_REQUEST['itemlist']));
    $path1 = $datadir . '/ggtemplist.php';
    $ggtl = '<?php exit();?>' . "\r\n" . $itemlist;
    file_put_contents($path1, $ggtl) or die('出错啦!无法修改.php文件!请将程序目录和所有文件的文件权限设置属性0755或0777。');
    $conn = new mysql();
    $conn->inoplog('排序广告模板', $itemlist, 1, getname());
    die('1');
    /////////////////////
} else {
    /////////////////////
    $ggtl = file_get_contents($datadir . '/ggtemplist.php');
    $ggtla = explode("\r\n", $ggtl);
    array_shift($ggtla);
    array_pop($ggtla);
    $ggtemp_list = '';
    $ggtemp_sortable = '';
    foreach ($ggtla as $key => $value) {
        if ($value && file_exists($datadir . '/' . $value . '.php')) {
            $mbnr = file($datadir . '/' . $value . '.php');
            array_shift($mbnr);
            $mbsm = htmlspecialchars(rtrim(array_shift($mbnr)));
开发者ID:nomagame,项目名称:ZiFeiYu-Management-System,代码行数:31,代码来源:ggtemplates.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getnickname函数代码示例发布时间:2022-05-15
下一篇:
PHP getnamasupplier函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap