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

PHP sgmdate函数代码示例

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

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



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

示例1: sgmdate

            echo $value['viewnum'];
            ?>
<br>
好友: <?php 
            echo $value['friendnum'];
            ?>
<br>
更新: <?php 
            if ($value['updatetime']) {
                echo sgmdate('Y-m-d', $value[updatetime], 1);
            }
            ?>
<br>
创建: <?php 
            if ($value['dateline']) {
                echo sgmdate('Y-m-d', $value[dateline], 1);
            }
            ?>
</td>
<?php 
            if ($managespace) {
                ?>
<td><a href="admincp.php?ac=space&op=manage&uid=<?php 
                echo $value['uid'];
                ?>
">管理</a><br></td><?php 
            }
            ?>
</tr>
<?php 
        }
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:31,代码来源:admin_tpl_space.php


示例2: gethotnews2

function gethotnews2($catids)
{
    global $_SGLOBAL, $catarr;
    $hotnews2 = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('spaceitems') . " WHERE folder =1 AND digest IN (1,2,3) AND catid IN (" . $catids . ") ORDER BY viewnum DESC, dateline DESC LIMIT 0, 10");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        $value['subject'] = cutstr($value['subject'], 30, 0);
        //标题样式
        if (!empty($value['styletitle'])) {
            $value['subject'] = '<span style=\'' . mktitlestyle($value['styletitle']) . '\'>' . $value['subject'] . '</span>';
        }
        $value['url'] = gethtmlurl2($value['catid']) . '/' . sgmdate($value['dateline'], 'Y') . '/' . sgmdate($value['dateline'], 'n') . '/' . $catarr[$value['catid']]['pre_html'] . $value['itemid'] . '.html';
        $hotnews2[] = $value;
    }
    return $hotnews2;
}
开发者ID:superman1982,项目名称:ng-cms,代码行数:16,代码来源:admin_makehtml.php


示例3: updatestat

function updatestat($type, $primary=0) {
	global $_SGLOBAL, $_SCONFIG;

	if(empty($_SGLOBAL['supe_uid']) || empty($_SCONFIG['updatestat'])) return false;
	
	$nowdaytime = sgmdate('Ymd', $_SGLOBAL['timestamp']);
	if($primary) {
		//去重
		$setarr = array(
			'uid' => $_SGLOBAL['supe_uid'],
			'daytime' => '$nowdaytime',
			'type' => $type
		);
		if(getcount('statuser', $setarr)) {
			return false;
		} else {
			inserttable('statuser', $setarr);//插入当天数据
		}
	}
	if(getcount('stat', array('daytime'=>$nowdaytime))) {
		$_SGLOBAL['db']->query("UPDATE ".tname('stat')." SET `$type`=`$type`+1 WHERE daytime='$nowdaytime'");
	} else {
		//删除昨天的防重数据
		$_SGLOBAL['db']->query("DELETE FROM ".tname('statuser')." WHERE daytime != '$nowdaytime'");
		//插入统计
		inserttable('stat', array('daytime'=>$nowdaytime, $type=>'1'));
	}
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:28,代码来源:function_cp.php


示例4: tname

        $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('topic') . " ORDER BY joinnum DESC LIMIT {$start},{$perpage}");
    } elseif ($_GET['view'] == 'me') {
        $count = getcount('topicuser', array('uid' => $_SGLOBAL['supe_uid']));
        $query = $_SGLOBAL['db']->query("SELECT t.* FROM " . tname('topicuser') . " tu\n\t\t\tLEFT JOIN " . tname('topic') . " t ON t.topicid=tu.topicid\n\t\t\tWHERE tu.uid='{$_SGLOBAL['supe_uid']}'\n\t\t\tORDER BY tu.dateline DESC LIMIT {$start},{$perpage}");
    } else {
        $_GET['view'] = 'new';
        $count = getcount('topic', array());
        $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('topic') . " ORDER BY lastpost DESC LIMIT {$start},{$perpage}");
    }
    $actives = array($_GET['view'] => ' class="active"');
    if ($count) {
        while ($value = $_SGLOBAL['db']->fetch_array($query)) {
            $value['pic'] = pic_get($value['pic'], $value['thumb'], $value['remote']);
            $value['lastpost'] = sgmdate('m-d H:i', $value['lastpost']);
            $value['dateline'] = sgmdate('m-d H:i', $value['dateline']);
            $value['endtime'] = $value['endtime'] ? sgmdate('m-d H:i', $value['endtime']) : '';
            $value['message'] = getstr($value['message'], 200, 0, 0, 0, 0, -1);
            realname_set($value['uid'], $value['username']);
            $list[] = $value;
        }
        $multi = multi($count, $perpage, $page, 'space.php?do=topic');
    }
    realname_get();
    $_TPL['css'] = 'event';
    include_once template('space_topic_list');
} else {
    if (!($topic = topic_get($topicid))) {
        showmessage('topic_no_found');
    }
    if ($topic['uid'] == $_SGLOBAL['supe_uid']) {
        $managetopic = 1;
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:space_topic.php


示例5: cpmsg

 if ($_GET['itemid']) {
     $wheresql = ' i.itemid=\'' . $_GET['itemid'] . '\'';
 } else {
     cpmsg('no_item', 'admin.php?action=list&m=' . $mname);
 }
 //取得信息
 $query = DB::query('SELECT * FROM ' . tname($mname . 'items') . ' i ' . ($mname == 'album' ? '' : 'INNER JOIN ' . tname($mname . 'message') . ' m ON i.itemid=m.itemid') . ' WHERE ' . $wheresql . ' ORDER BY i.itemid DESC LIMIT 1');
 $editvalue = DB::fetch($query);
 if (empty($editvalue)) {
     cpmsg('no_item', 'admin.php?action=list&m=' . $mname);
 }
 if ($mname == 'good' || $mname == 'groupbuy') {
     $relatedarr = array();
     $relatedarr = getrelatedinfo($mname, $editvalue['itemid'], $editvalue['shopid']);
 }
 $editvalue['dateline'] = sgmdate($editvalue['dateline']);
 //管理員查看基本信息&& $mname=='shop'
 if ($_GET['op'] == 'adminview') {
     if (empty($_SGLOBAL['panelinfo'])) {
         getpanelinfo($_GET['itemid']);
     }
     if ($_GET['updatepass'] == 1) {
         $updateser = DB::fetch(DB::query("SELECT * FROM " . tname("itemupdates") . " WHERE itemid='{$_GET['itemid']}' and type = '{$mname}'"));
         $update = unserialize($updateser['update']);
         $update = sstripslashes($update);
         $update['groupid'] = $_SGLOBAL['panelinfo']['group']['title'];
         $categorylist = getmodelcategory($mname);
         $update['attr_catid'] = $update['catid'];
         $update['catid'] = $categorylist[$update['catid']]['name'];
         $categorylist = getmodelcategory('region');
         $update['region'] = $categorylist[$update['region']]['name'];
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:edit.inc.php


示例6: sgmdate

    echo $uid;
    ?>
">删除头像</a>]
</td></tr>
<tr><th>开通时间</th><td><?php 
    echo sgmdate('Y-m-d H:i', $member[dateline]);
    ?>
</td></tr>
<tr><th>更新时间</th><td><?php 
    if ($member['updatetime']) {
        echo sgmdate('Y-m-d H:i', $member[updatetime]);
    }
    ?>
</td></tr>
<tr><th>上次登录</th><td><?php 
    echo sgmdate('Y-m-d H:i', $member[lastlogin]);
    ?>
</td></tr>
<tr><th>上次登录IP</th><td><?php 
    echo $member['ip'];
    ?>
</td></tr>
<tr><th>好友数</th><td><?php 
    echo $member['friendnum'];
    ?>
</td></tr>
<tr><th>查看数</th><td><?php 
    echo $member['viewnum'];
    ?>
</td></tr>
<tr><th>批量管理</th>
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:31,代码来源:admin_tpl_space_manage.php


示例7: blog_post

function blog_post($POST, $olds=array()) {
	global $_SGLOBAL, $_SC, $space;
	
	//操作者角色切换
	$isself = 1;
	if(!empty($olds['uid']) && $olds['uid'] != $_SGLOBAL['supe_uid']) {
		$isself = 0;
		$__SGLOBAL = $_SGLOBAL;
		$_SGLOBAL['supe_uid'] = $olds['uid'];
		$_SGLOBAL['supe_username'] = addslashes($olds['username']);
	}

	//标题
	$POST['subject'] = getstr(trim($POST['subject']), 80, 1, 1, 1);
	if(strlen($POST['subject'])<1) $POST['subject'] = sgmdate('Y-m-d');
	$POST['friend'] = intval($POST['friend']);
	
	//隐私
	$POST['target_ids'] = '';
	if($POST['friend'] == 2) {
		//特定好友
		$uids = array();
		$names = empty($_POST['target_names'])?array():explode(' ', str_replace(cplang('tab_space'), ' ', $_POST['target_names']));
		if($names) {
			$query = $_SGLOBAL['db']->query("SELECT uid FROM ".tname('space')." WHERE username IN (".simplode($names).")");
			while ($value = $_SGLOBAL['db']->fetch_array($query)) {
				$uids[] = $value['uid'];
			}
		}
		if(empty($uids)) {
			$POST['friend'] = 3;//仅自己可见
		} else {
			$POST['target_ids'] = implode(',', $uids);
		}
	} elseif($POST['friend'] == 4) {
		//加密
		$POST['password'] = trim($POST['password']);
		if($POST['password'] == '') $POST['friend'] = 0;//公开
	}
	if($POST['friend'] !== 2) {
		$POST['target_ids'] = '';
	}
	if($POST['friend'] !== 4) {
		$POST['password'] == '';
	}

	$POST['tag'] = shtmlspecialchars(trim($POST['tag']));
	$POST['tag'] = getstr($POST['tag'], 500, 1, 1, 1);	//语词屏蔽

	//内容
	if($_SGLOBAL['mobile']) {
		$POST['message'] = getstr($POST['message'], 0, 1, 0, 1, 1);
	} else {
		$POST['message'] = checkhtml($POST['message']);
		$POST['message'] = getstr($POST['message'], 0, 1, 0, 1, 0, 1);
		$POST['message'] = preg_replace(array(
				"/\<div\>\<\/div\>/i",
				"/\<a\s+href\=\"([^\>]+?)\"\>/i"
			), array(
				'',
				'<a href="\\1" target="_blank">'
			), $POST['message']);
	}
	$message = $POST['message'];

	//个人分类
	if(empty($olds['classid']) || $POST['classid'] != $olds['classid']) {
		if(!empty($POST['classid']) && substr($POST['classid'], 0, 4) == 'new:') {
			//分类名
			$classname = shtmlspecialchars(trim(substr($POST['classid'], 4)));
			$classname = getstr($classname, 0, 1, 1, 1);
			if(empty($classname)) {
				$classid = 0;
			} else {
				$classid = getcount('class', array('classname'=>$classname, 'uid'=>$_SGLOBAL['supe_uid']), 'classid');
				if(empty($classid)) {
					$setarr = array(
						'classname' => $classname,
						'uid' => $_SGLOBAL['supe_uid'],
						'dateline' => $_SGLOBAL['timestamp']
					);
					$classid = inserttable('class', $setarr, 1);
				}
			}
		} else {
			$classid = intval($POST['classid']);

		}
	} else {
		$classid = $olds['classid'];
	}
	if($classid && empty($classname)) {
		//是否是自己的
		$classname = getcount('class', array('classid'=>$classid, 'uid'=>$_SGLOBAL['supe_uid']), 'classname');
		if(empty($classname)) $classid = 0;
	}
	
	//主表
	$blogarr = array(
		'subject' => $POST['subject'],
//.........这里部分代码省略.........
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:101,代码来源:function_blog.php


示例8: label

 echo label(array('type' => 'table-start', 'class' => 'listtable'));
 echo '<tr">';
 echo '<th>' . $alang['cron_name'] . '</th>';
 echo '<th>' . $alang['cron_type'] . '</th>';
 echo '<th>' . $alang['cron_available'] . '</th>';
 echo '<th>' . $alang['cron_lastrun'] . '</th>';
 echo '<th>' . $alang['cron_nextrun'] . '</th>';
 echo '<th>' . $alang['space_op'] . '</th>';
 echo '</tr>';
 foreach ($listarr as $listvalue) {
     if (!discuz_exists() && ($listvalue['filename'] == 'updatebbsforums.php' || $listvalue['filename'] == 'updatebbscache.php')) {
         continue;
     }
     empty($class) ? $class = ' class="darkrow"' : ($class = '');
     $listvalue['lastrun'] = sgmdate($listvalue['lastrun'], '', 0);
     $listvalue['nextrun'] = sgmdate($listvalue['nextrun'], '', 0);
     if (!$listvalue['available']) {
         $trbgcolor = '#CCCCCC';
         $listvalue['nextrun'] = '-';
     }
     echo '<tr' . $class . ' align="center">';
     echo '<td align="left"><b>' . $listvalue['name'] . '</b></td>';
     echo '<td>' . $alang['cron_type_' . $listvalue['type']] . '</td>';
     echo '<td>' . $alang['cron_available_' . $listvalue['available']] . '</td>';
     echo '<td>' . $listvalue['lastrun'] . '</td>';
     echo '<td>' . $listvalue['nextrun'] . '</td>';
     echo '<td align="left"><a href="' . $newurl . '&op=run&cronid=' . $listvalue['cronid'] . '">' . $alang['cron_run'] . '</a> | <a href="' . $newurl . '&op=edit&cronid=' . $listvalue['cronid'] . '">' . $alang['space_edit'] . '</a>';
     if ($listvalue['type'] == 'user') {
         echo ' | <a href="' . $newurl . '&op=delete&cronid=' . $listvalue['cronid'] . '">' . $alang['space_delete'] . '</a>';
     }
     echo '</td>';
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:admin_crons.php


示例9: getattachdir

function getattachdir()
{
    global $_SCONFIG, $_SGLOBAL;
    switch ($_SCONFIG['attachmentdirtype']) {
        case 'year':
            $dirpatharr[] = sgmdate($_SGLOBAL['timestamp'], 'Y');
            break;
        case 'month':
            $dirpatharr[] = sgmdate($_SGLOBAL['timestamp'], 'Y');
            $dirpatharr[] = sgmdate($_SGLOBAL['timestamp'], 'm');
            break;
        case 'day':
            $dirpatharr[] = sgmdate($_SGLOBAL['timestamp'], 'Y');
            $dirpatharr[] = sgmdate($_SGLOBAL['timestamp'], 'm');
            $dirpatharr[] = sgmdate($_SGLOBAL['timestamp'], 'd');
            break;
        case 'md5':
            $md5string = md5($_SGLOBAL['supe_uid'] . '-' . $_SGLOBAL['timestamp'] . '-' . $_SGLOBAL['_num']);
            $dirpatharr[] = substr($md5string, 0, 1);
            $dirpatharr[] = substr($md5string, 1, 1);
            break;
        default:
            break;
    }
    $dirs = A_DIR;
    $subarr = array();
    foreach ($dirpatharr as $value) {
        $dirs .= '/' . $value;
        if (smkdir($dirs)) {
            $subarr[] = $value;
        } else {
            break;
        }
    }
    return implode('/', $subarr);
}
开发者ID:hongz1125,项目名称:devil,代码行数:36,代码来源:upload.func.php


示例10: feed_publish


//.........这里部分代码省略.........
                    $setarr['body_template'] = '<b>{subject}</b><br>' . cplang('mtag') . ': {mtag}<br>{summary}';
                    $setarr['body_data'] = array('subject' => "<a href=\"{$url}\">{$value['subject']}</a>", 'mtag' => "<a href=\"space.php?do=mtag&tagid={$value['tagid']}\">{$mtag['tagname']}</a>", 'summary' => getstr($value['message'], 150, 1, 1, 0, 0, -1));
                }
            }
            break;
        case 'pid':
            $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('poll') . " WHERE pid='{$id}'");
            if ($value = $_SGLOBAL['db']->fetch_array($query)) {
                //
                $setarr['icon'] = 'poll';
                $setarr['id'] = $value['pid'];
                $setarr['idtype'] = $idtype;
                $setarr['uid'] = $value['uid'];
                $setarr['username'] = $value['username'];
                $setarr['dateline'] = $value['dateline'];
                $setarr['hot'] = $value['hot'];
                //ϸ
                $url = "space.php?uid={$value['uid']}&do=poll&pid={$value['pid']}";
                $setarr['title_template'] = cplang('feed_poll');
                $setarr['body_template'] = '<a href="{url}"><strong>{subject}</strong></a>{option}';
                $optionstr = '';
                $opquery = $_SGLOBAL['db']->query("SELECT * FROM " . tname("polloption") . " WHERE pid='{$value['pid']}' LIMIT 0,2");
                while ($opt = $_SGLOBAL['db']->fetch_array($opquery)) {
                    $optionstr .= '<br><input type="' . ($value['maxchoice'] > 1 ? 'checkbox' : 'radio') . '" disabled name="poll_' . $opt['oid'] . '"/>' . $opt['option'];
                }
                $setarr['body_data'] = array('url' => $url, 'subject' => $value['subject'], 'option' => $optionstr);
                $setarr['body_general'] = $value['percredit'] ? cplang('reward_info', array($value['percredit'])) : '';
            }
            break;
        case 'eventid':
            $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('event') . " WHERE eventid='{$id}'");
            if ($value = $_SGLOBAL['db']->fetch_array($query)) {
                //
                $setarr['icon'] = 'event';
                $setarr['id'] = $value['eventid'];
                $setarr['idtype'] = $idtype;
                $setarr['uid'] = $value['uid'];
                $setarr['username'] = $value['username'];
                $setarr['dateline'] = $value['dateline'];
                $setarr['hot'] = $value['hot'];
                //ϸ
                $url = "space.php?do=event&id={$value['eventid']}";
                $setarr['title_template'] = cplang('event_add');
                $setarr['body_template'] = cplang('event_feed_info');
                $setarr['body_data'] = array('title' => "<a href=\"{$url}\">{$value['title']}</a>", 'country' => $value['country'], 'province' => $value['province'], 'city' => $value['city'], 'location' => $value['location'], 'starttime' => sgmdate('m-d H:i', $value['starttime']), 'endtime' => sgmdate('m-d H:i', $value['endtime']));
                //
                if ($value['poster']) {
                    $setarr['image_1'] = pic_get($value['poster'], $value['thumb'], $value['remote']);
                    $setarr['image_1_link'] = $url;
                }
            }
            break;
        case 'sid':
            $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('share') . " WHERE sid='{$id}'");
            if ($value = $_SGLOBAL['db']->fetch_array($query)) {
                //
                $setarr['icon'] = 'share';
                $setarr['id'] = $value['sid'];
                $setarr['idtype'] = $idtype;
                $setarr['uid'] = $value['uid'];
                $setarr['username'] = $value['username'];
                $setarr['dateline'] = $value['dateline'];
                $setarr['hot'] = $value['hot'];
                //ϸ
                $url = "space.php?uid={$value['uid']}&do=share&id={$value['sid']}";
                $setarr['title_template'] = '{actor} ' . $value['title_template'];
                $setarr['body_template'] = $value['body_template'];
                $setarr['body_data'] = $value['body_data'];
                $setarr['body_general'] = $value['body_general'];
                $setarr['image_1'] = $value['image'];
                $setarr['image_1_link'] = $value['image_link'];
            }
            break;
    }
    if ($setarr['icon']) {
        $setarr['appid'] = UC_APPID;
        //ݴ
        $setarr['title_data'] = serialize($setarr['title_data']);
        // groups ת
        if ($idtype != 'sid') {
            $setarr['body_data'] = serialize($setarr['body_data']);
            // groups ת
        }
        $setarr['hash_template'] = md5($setarr['title_template'] . "\t" . $setarr['body_template']);
        //ϲhash
        $setarr['hash_data'] = md5($setarr['title_template'] . "\t" . $setarr['title_data'] . "\t" . $setarr['body_template'] . "\t" . $setarr['body_data']);
        //ϲhash
        $setarr = saddslashes($setarr);
        $feedid = 0;
        if (!$add && $setarr['id']) {
            $query = $_SGLOBAL['db']->query("SELECT feedid FROM " . tname('feed') . " WHERE id='{$id}' AND idtype='{$idtype}'");
            $feedid = $_SGLOBAL['db']->result($query, 0);
        }
        if ($feedid) {
            updatetable('feed', $setarr, array('feedid' => $feedid));
        } else {
            inserttable('feed', $setarr);
        }
    }
}
开发者ID:v998,项目名称:discuzx-en,代码行数:101,代码来源:function_feed.php


示例11: foreach

			<th width="5%">' . $alang['block_select'] . '</th>
			<th>' . $alang['spaceblog_subject'] . '</th>
			<th width="15%">' . $alang['robot_robot_author'] . '</th>
			<th width="15%">' . $alang['space_order_dateline'] . '</th>
		</tr>';
        foreach ($listarr as $value) {
            $url = geturl('action/viewnews/itemid/' . $value['itemid']);
            $postip = '';
            if (!empty($value['postip'])) {
                $postip = '<br>' . $value['postip'];
            }
            echo '<tr>
			<td><input class="checkbox" type="checkbox" name="item[]" value="' . $value['itemid'] . '" checked></td>
			<td><a href="' . $url . '" target="_blank">' . $value['subject'] . '</a></td>
			<td><a href="' . geturl('uid/' . $value['uid']) . '" target="_blank">' . $value['username'] . '</a>' . $postip . '</td>
			<td>' . sgmdate($value['dateline'], 'Y-n-d\\<\\b\\r\\>H:i:s') . '</td>
			</tr>';
        }
        echo '</table>';
        if (!empty($multipage)) {
            echo $multipage;
        }
    }
    print <<<END
\t<input type="hidden" name="itemids" value="{$itemids}">
\t<div class="buttons">
\t<input type="submit" name="dosubmit" value="{$alang['submitted_operation']}" class="submit">
\t<input type="reset" name="doreset" value="{$alang['common_reset']}">
\t</div>
\t</form>
END;
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:admin_items.php


示例12: foreach

\t\t\t<table cellspacing="0" cellpadding="0" width="100%"  class="listtable">
\t\t\t\t<tr>
\t\t\t\t<th width="5%">{$alang['database_export_del']}</th>
\t\t\t\t<th width="20%">{$alang['database_export_filename']}</th>
\t\t\t\t<th width="5%">{$alang['database_export_version']}</th>
\t\t\t\t<th width="20%">{$alang['database_export_dateline']}</th>
\t\t\t\t<th width="10%">{$alang['database_export_type']}</th>
\t\t\t\t<th width="8%">{$alang['database_export_filesize']}</th>
\t\t\t\t<th width="5%">{$alang['database_export_method']}</th>
\t\t\t\t<th width="5%">{$alang['database_expot_volume']}</th>
\t\t\t\t<th width="5%">{$alang['database_export_op']}</th>
\t\t\t\t</tr>
END;
    $exportinfo = '';
    foreach ($exportlog as $info) {
        $info['dateline'] = is_int($info['dateline']) ? sgmdate($info['dateline']) : $alang['database_date_unknown'];
        $info['size'] = formatsize($info['size']);
        $info['volume'] = $info['method'] == 'multivol' ? $info['volume'] : '';
        $info['method'] = $info['type'] != 'zip' ? $info['method'] == 'multivol' ? $alang['database_multivol'] : $alang['database_shell'] : '';
        $import = $info['type'] == 'zip' ? "<td align=center><a href='{$theurl}&op=importstart&do=zip&datafile={$info['filename']}'>[{$alang['database_import_unzip']}]</td>" : "<td align='center'><a href='{$theurl}&op=importstart&do=import&datafile={$info['filename']}'" . ($info['version'] != S_VER ? " onclick=\"return confirm('{$alang['database_import_confirm']}');\"" : '') . ">[{$alang['database_import_import']}]</a></td>";
        $exportinfo .= '<tr><td align="center"><input type="checkbox" name="delexport[]" value="' . $info['filename'] . '"></td><td><a href=' . $dataurl . '/' . $info['filename'] . '>' . basename($info['filename']) . '</a><td align="center">' . S_VER . '</td><td>' . $info['dateline'] . '</td><td align="center">' . $alang['database_export_' . $info['type']] . '</td><td align="center">' . $info['size'] . '</td><td align="center">' . $info['method'] . '</td><td align="center">' . $info['volume'] . '</td>' . $import;
    }
    print <<<END
\t{$exportinfo}
\t<table cellspacing="0" cellpadding="0" width="100%"  class="btmtable">
\t<tr><th><input type="checkbox" name="chkall" onclick="checkall(this.form, 'delexport')">{$alang['space_select_all']}</th></tr>
\t</table>
\t</table>
\t<div class="buttons">
\t\t<input type="submit" name="listsubmit" value="{$alang['common_submit']}" class="submit">
\t</div>
开发者ID:hongz1125,项目名称:devil,代码行数:31,代码来源:admin_database.php


示例13: tname

     if ($offset < 0) {
         $offset = 0;
     }
     $sql = "SELECT * from " . tname('weixin_question') . " as q inner join " . tname('weixin_member') . " as m on q.uid=m.uid " . $querystr . " order by q.addtime desc limit " . $offset . "," . $pagesize;
     $list = $_SGLOBAL['db']->getall($sql);
     foreach ($list as $k => $v) {
         $list[$k]['headimg'] = $_SC['img_url'] . '/weixin_headimg/' . $v['fakeid'] . '.png';
         $list[$k]['weixin_name'] = $_SGLOBAL['db']->getone('select weixin_name from ' . tname('open_member_weixin') . ' where id=' . $v['op_wxid']);
         $list[$k]['replylist'] = $_SGLOBAL['db']->getall('select * from ' . tname('weixin_reply') . ' as r left join ' . tname('member') . ' as m on r.uid=m.uid where r.question_id=' . $v['id']);
         foreach ($list[$k]['replylist'] as $key => $value) {
             if ($list[$k]['replylist'][$key]['uid'] == 0) {
                 $list[$k]['replylist'][$key]['fullname'] = $list[$k]['weixin_name'];
             }
             $list[$k]['replylist'][$key]['addtime'] = sgmdate("Y-m-d H:i:s", $list[$k]['replylist'][$key]['addtime']);
         }
         $list[$k]['addtime'] = sgmdate("Y-m-d H:i:s", $list[$k]['addtime']);
     }
     $arr = array("pagesize" => $pagesize, "page" => $page, "pagenum" => $pagenum, "total" => $total, "offset" => $offset, "err" => 0);
     if ($total > 0) {
         $count = 1;
         foreach ($list as $k => $v) {
             $list[$k]['count'] = $count + $offset;
             $arr['list'][] = $list[$k];
             $count++;
         }
     }
     echo json_encode($arr);
     exit;
     break;
 default:
     $wxid = getstr($_GET['wxid']);
开发者ID:hugolong,项目名称:weixiao,代码行数:31,代码来源:wx_singlemsg.php


示例14: intval

<?php

include_once './common.php';
$msgid = intval($_GET['id']) ? intval($_GET['id']) : 0;
if (!$msgid) {
    exit;
}
$query = $_SGLOBAL['db']->query('select * from ' . tname('open_member_weixin_autoreply_info') . ' where id=' . $msgid);
$msg = $_SGLOBAL['db']->fetch_array($query);
if (!$msg) {
    exit;
}
$msg['content'] = htmlspecialchars_decode($msg['content']);
$msg['addtime'] = sgmdate("Y-m-d", $msg['addtime']);
$msg['url'] = $_SC['site_host'] . '/appmsg/?id=' . $msg['id'];
$smarty->assign('msg', $msg);
$smarty->display('index.dwt');
开发者ID:hugolong,项目名称:weixiao,代码行数:17,代码来源:index.php


示例15: blog_post

function blog_post($POST, $olds = array())
{
    global $_SGLOBAL, $_SC, $space;
    //�����߽�ɫ�л�
    $isself = 1;
    if (!empty($olds['uid']) && $olds['uid'] != $_SGLOBAL['supe_uid']) {
        $isself = 0;
        $__SGLOBAL = $_SGLOBAL;
        $_SGLOBAL['supe_uid'] = $olds['uid'];
        $_SGLOBAL['supe_username'] = addslashes($olds['username']);
    }
    //����
    $POST['subject'] = getstr(trim($POST['subject']), 80, 1, 1, 1);
    if (strlen($POST['subject']) < 1) {
        $POST['subject'] = sgmdate('Y-m-d');
    }
    $POST['friend'] = intval($POST['friend']);
    //��˽
    $POST['target_ids'] = '';
    if ($POST['friend'] == 2) {
        //�ض�����
        $uids = array();
        $names = empty($_POST['target_names']) ? array() : explode(' ', str_replace(cplang('tab_space'), ' ', $_POST['target_names']));
        if ($names) {
            $query = $_SGLOBAL['db']->query("SELECT uid FROM " . tname('space') . " WHERE username IN (" . simplode($names) . ")");
            while ($value = $_SGLOBAL['db']->fetch_array($query)) {
                $uids[] = $value['uid'];
            }
        }
        if (empty($uids)) {
            $POST['friend'] = 3;
            //���Լ��ɼ�
        } else {
            $POST['target_ids'] = implode(',', $uids);
        }
    } elseif ($POST['friend'] == 4) {
        //����
        $POST['password'] = trim($POST['password']);
        if ($POST['password'] == '') {
            $POST['friend'] = 0;
        }
        //����
    }
    if ($POST['friend'] !== 2) {
        $POST['target_ids'] = '';
    }
    if ($POST['friend'] !== 4) {
        $POST['password'] == '';
    }
    $POST['tag'] = shtmlspecialchars(trim($POST['tag']));
    $POST['tag'] = getstr($POST['tag'], 500, 1, 1, 1);
    //�������
    //����
    if ($_SGLOBAL['mobile']) {
        $POST['message'] = getstr($POST['message'], 0, 1, 0, 1, 1);
    } else {
        $POST['message'] = checkhtml($POST['message']);
        $POST['message'] = getstr($POST['message'], 0, 1, 0, 1, 0, 1);
        $POST['message'] = preg_replace(array("/\\<div\\>\\<\\/div\\>/i", "/\\<a\\s+href\\=\"([^\\>]+?)\"\\>/i"), array('', '<a href="\\1" target="_blank">'), $POST['message']);
    }
    $message = $POST['message'];
    //���˷���
    if (empty($olds['classid']) || $POST['classid'] != $olds['classid']) {
        if (!empty($POST['classid']) && substr($POST['classid'], 0, 4) == 'new:') {
            //������
            $classname = shtmlspecialchars(trim(substr($POST['classid'], 4)));
            $classname = getstr($classname, 0, 1, 1, 1);
            if (empty($classname)) {
                $classid = 0;
            } else {
                $classid = getcount('class', array('classname' => $classname, 'uid' => $_SGLOBAL['supe_uid']), 'classid');
                if (empty($classid)) {
                    $setarr = array('classname' => $classname, 'uid' => $_SGLOBAL['supe_uid'], 'dateline' => $_SGLOBAL['timestamp']);
                    $classid = inserttable('class', $setarr, 1);
                }
            }
        } else {
            $classid = intval($POST['classid']);
        }
    } else {
        $classid = $olds['classid'];
    }
    if ($classid && empty($classname)) {
        //�Ƿ����Լ���
        $classname = getcount('class', array('classid' => $classid, 'uid' => $_SGLOBAL['supe_uid']), 'classname');
        if (empty($classname)) {
            $classid = 0;
        }
    }
    //����
    $blogarr = array('subject' => $POST['subject'], 'classid' => $classid, 'friend' => $POST['friend'], 'password' => $POST['password'], 'noreply' => empty($_POST['noreply']) ? 0 : 1);
    //����ͼƬ
    $titlepic = '';
    //��ȡ�ϴ���ͼƬ
    $uploads = array();
    if (!empty($POST['picids'])) {
        $picids = array_keys($POST['picids']);
        $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('pic') . " WHERE picid IN (" . simplode($picids) . ") AND uid='{$_SGLOBAL['supe_uid']}'");
        while ($value = $_SGLOBAL['db']->fetch_array($query)) {
            if (empty($titlepic) && $value['thumb']) {
//.........这里部分代码省略.........
开发者ID:shiyake,项目名称:php-ihome,代码行数:101,代码来源:function_blog.php


示例16: exportfile

function exportfile($array, $filename)
{
    global $_SGLOBAL, $_SCONFIG;
    global $_SERVER;
    $array['version'] = strip_tags(S_VER);
    $time = sgmdate($_SGLOBAL['timestamp']);
    $exporttext = "# SupeSite Dump\r\n" . "# Version: SupeSite " . S_VER . "\r\n" . "# Time: {$time}\r\n" . "# From: {$_SCONFIG['sitename']} (" . S_URL . ")\r\n" . "#\r\n" . "# This file was BASE64 encoded\r\n" . "#\r\n" . "# SupeSite: http://www.supesite.com\r\n" . "# Please visit our website for latest news about SupeSite\r\n" . "# --------------------------------------------------------\r\n\r\n\r\n" . wordwrap(base64_encode(serialize($array)), 50, "\r\n", 1);
    obclean();
    header('Content-Encoding: none');
    header('Content-Type: ' . (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ? 'application/octetstream' : 'application/octet-stream'));
    header('Content-Disposition: attachment; filename="' . $filename . '.txt"');
    header('Content-Length: ' . strlen($exporttext));
    header('Pragma: no-cache');
    header('Expires: 0');
    echo $exporttext;
    exit;
}
开发者ID:superman1982,项目名称:ng-cms,代码行数:17,代码来源:admin_robots.php


示例17: write

             write('<loc>' . $filevalue . '</loc>');
             write('<lastmod>' . sgmdate($_SGLOBAL['timestamp'], 'Y-m-d') . '</lastmod>');
             write('</sitemap>');
         }
     }
     fclose($fp);
     if (!empty($urlarr)) {
         foreach ($urlarr as $n => $itemurlarr) {
             $sitemapfile = $sitemap_path . $value['mapname'] . '_' . $n . '.xml';
             if ($fp = @fopen($sitemapfile, 'w+')) {
                 write('<?xml version="1.0" encoding="utf-8"?>');
                 write('<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">');
                 foreach ($itemurlarr as $url) {
                     write('<url>');
                     write('<loc>' . $url . '</loc>');
                     write('<lastmod>' . sgmdate($_SGLOBAL['timestamp'], 'Y-m-d') . '</lastmod>');
                     write('<changefreq>' . $value['changefreq'] . '</changefreq>');
                     write('</url>');
                 }
             }
             write('</urlset>');
             fclose($fp);
         }
     }
 }
 $lastfileid = count($sitemapdata['file']);
 $mapdata = addslashes(serialize($sitemapdata));
 $_SGLOBAL['db']->query("UPDATE " . tname('sitemaplogs') . " SET lastitemid='{$value['lastitemid']}', dateline='{$_SGLOBAL['timestamp']}', mapdata='{$mapdata}', lastfileid='{$lastfileid}' WHERE slogid='{$value['slogid']}'");
 if ($value['lastitemid'] < $countnum) {
     showmessage($alang['sitemap_start_create'] . $value['lastitemid'] . '->' . ($value['lastitemid'] + $value['mapnum']) . $alang['sitemap_start_create_1'], $theurl . '&op=update&start=1&slogid=' . $value['slogid']);
 } else {
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:admin_sitemap.php


示例18: label

 }
 echo $htmlarr['js'];
 echo label(array('type' => 'form-start', 'name' => 'listform', 'action' => $theurl));
 echo label(array('type' => 'table-start', 'class' => 'listtable'));
 echo '<tr>';
 echo '<th width="50">' . $alang['space_select'] . '</th>';
 echo '<th>' . $alang['tag_tagname'] . '/' . $alang['tag_relativetags'] . '</th>';
 echo '<th width="80">' . $alang['tag_creat_dateline'] . '</th>';
 echo '<th width="80">' . $alang['tag_username'] . '</th>';
 echo '<th width="70">' . $alang['tag_spacenewsnum'] . '</th>';
 echo '<th width="50">' . $alang['tag_close'] . '</th>';
 echo '<th width="50">' . $alang['tag_op'] . '</th>';
 echo '</tr>';
 foreach ($listarr as $listvalue) {
     empty($class) ? $class = ' class="darkrow"' : ($class = '');
     $listvalue['dateline'] = sgmdate($listvalue['dateline'], $_SGLOBAL['member']['dateformat']);
     if ($listvalue['close']) {
         $listvalue['tagname'] = '<a href="' . geturl('action/tag/tagid/' . $listvalue['tagid']) . '" target="_blank">' . $listvalue['tagname'] . '</a>';
     } else {
         $listvalue['tagname'] = '<a href="' . geturl('action/tag/tagid/' . $listvalue['tagid']) . '" target="_blank"><b>' . $listvalue['tagname'] . '</b></a>';
     }
     echo '<tr' . $class . '>';
     echo '<td><input name="item[]" type="checkbox" value="' . $listvalue['tagid'] . '" /></td>';
     echo '<td>' . $listvalue['tagname'] . '<p class="relativetags">' . $listvalue['relativetags'] . '</p></td>';
     echo '<td>' . $listvalue['dateline'] . '</td>';
     echo '<td>' . $listvalue['username'] . '</td>';
     echo '<td>' . $listvalue['spacenewsnum'] . '</td>';
     echo '<td>' . $alang['tag_close_' . $listvalue['close']] . '</td>';
     echo '<td><a href="' . $theurl . '&op=edit&tagid=' . $listvalue['tagid'] . '">' . $alang['space_edit'] . '</a></td>';
     echo '</tr>';
 }
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:admin_tags.php


示例19: arraykeys2

     $tables = arraykeys2(fetchtablelist($tablepre), 'Name');
 } elseif ($type == 'custom') {
     if (isset($_POST['setup'])) {
         //POST submit backup
         $tables = empty($_POST['customtables']) ? array() : $_POST['customtables'];
         data_set('custombackup', $tables);
     } else {
         //Jump backup automatically
         $tables = data_get('custombackup');
         $tables = unserialize($tables);
     }
 }
 if (empty($tables) || !is_array($tables)) {
     cpmessage('backup_table_wrong');
 }
 $time = sgmdate('Y-m-d H:i:s', $_SGLOBAL['timestamp']);
 $idstring = '# Identify: ' . base64_encode("{$_SGLOBAL['timestamp']}," . X_VER . ",{$type},{$method},{$volume}") . "\n";
 $dumpcharset = $sqlcharset ? $sqlcharset : str_replace('-', '', $_SC['charset']);
 $setnames = $sqlcharset && $_SGLOBAL['db']->version() > '4.1' && (!$sqlcompat || $sqlcompat == 'MYSQL41') ? "SET NAMES '{$dumpcharset}';\n\n" : '';
 if ($_SGLOBAL['db']->version() > '4.1') {
     if ($sqlcharset) {
         $_SGLOBAL['db']->query("SET NAMES '{$sqlcharset}'");
     }
     if ($sqlcompat == 'MYSQL40') {
         $_SGLOBAL['db']->query("SET SQL_MODE='MYSQL40'");
     } elseif ($sqlcompat == 'MYSQL41') {
         $_SGLOBAL['db']->query("SET SQL_MODE=' '");
     }
 }
 $backupfile = S_ROOT . './data/' . $backupdir . '/' . $filename;
 if ($usezip) {
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:admincp_backup.php

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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