本文整理汇总了PHP中_button函数的典型用法代码示例。如果您正苦于以下问题:PHP _button函数的具体用法?PHP _button怎么用?PHP _button使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_button函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _home
public function _home() {
global $config, $user, $cache;
if (!_button()) {
$sql = 'SELECT forum_id, forum_name
FROM _forums
ORDER BY forum_order ASC';
$result = sql_rowset($sql);
foreach ($result as $i => $row) {
if (!$i) _style('forums');
_style('forums.row', array(
'FORUM_ID' => $row['forum_id'],
'FORUM_NAME' => $row['forum_name'])
);
}
return false;
}
$list = request_var('listContainer', array(0));
$orderid = 10;
foreach ($list as $catid) {
$sql = 'UPDATE _forums SET forum_order = ?
WHERE forum_id = ?';
sql_query(sql_filter($sql, $orderid, $catid));
$orderid += 10;
}
_pre('Update.', true);
}
示例2: _home
public function _home() {
global $config, $user, $cache;
if (_button()) {
$forum_id = request_var('fid', 0);
$forum_alias = request_var('falias', '');
$sql = 'UPDATE _forums SET forum_alias = ?
WHERE forum_id = ?';
sql_query(sql_filter($sql, $forum_alias, $forum_id));
_pre($forum_id . ' > ' . $forum_alias, true);
}
$sql = 'SELECT forum_id, forum_name
FROM _forums
ORDER BY forum_order';
$result = sql_rowset($sql);
foreach ($result as $i => $row) {
if (!$i) _style('forums');
_style('forums.row', array(
'FORUM_ID' => $row['forum_id'],
'FORUM_NAME' => $row['forum_name'])
);
}
return;
}
示例3: _home
public function _home() {
global $config, $user, $cache;
if (!_button()) {
return false;
}
$topic = request_var('topic', 0);
$important = request_var('important', 0);
$sql = 'SELECT *
FROM _forum_topics
WHERE topic_id = ?';
if (!$topicdata = sql_fieldrow(sql_filter($sql, $topic))) {
fatal_error();
}
$sql_important = ($important) ? ', topic_important = 1' : '';
$sql = 'UPDATE _forum_topics
SET topic_color = ?, topic_announce = 1' . $sql_important . '
WHERE topic_id = ?';
sql_query(sql_filter($sql, 'E1CB39', $topic));
return _pre('El tema <strong>' . $topicdata['topic_title'] . '</strong> ha sido anunciado.', true);
}
示例4: run_object
private function run_object() {
if (_button()) {
return $this->store();
}
return;
}
示例5: _home
public function _home() {
global $config, $user, $cache;
if (!_button()) {
return false;
}
$username = request_var('username', '');
if (empty($username)) {
fatal_error();
}
$username = get_username_base($username);
$sql = 'SELECT user_id
FROM _members
WHERE username_base = ?';
if (!$row = sql_fieldrow(sql_filter($sql, $username))) {
fatal_error();
}
$sql = 'DELETE FROM _members_unread
WHERE user_id = ?
AND element <> ?';
sql_query(sql_filter($sql, $row['user_id'], 16));
return _pre('Deleted', true);
}
示例6: _home
public function _home() {
global $config, $user, $comments;
$this->_artist();
if (_button()) {
$message = request_var('message', '');
$message = $comments->prepare($message);
$sql = 'UPDATE _artists SET bio = ?
WHERE ub = ?';
sql_query(sql_filter($sql, $message, $this->object['ub']));
_style('updated');
}
$sql = 'SELECT bio
FROM _artists
WHERE ub = ?';
$bio = sql_field(sql_filter($sql, $this->object['ub']), 'bio');
v_style(array(
'MESSAGE' => $bio)
);
return;
}
示例7: _home
public function _home() {
global $config, $user, $cache;
if (!_button()) {
return;
}
$this->id = request_var('msg_id', 0);
$sql = 'SELECT *
FROM _forum_topics
WHERE topic_id = ?';
if (!$this->object = sql_fieldrow(sql_filter($sql, $this->id))) {
fatal_error();
}
$this->object = (object) $this->object;
$this->object->new_value = ($this->object->topic_featured) ? 0 : 1;
topic_feature($this->id, $this->object->new_value);
$sql_insert = array(
'bio' => $user->d('user_id'),
'time' => time(),
'ip' => $user->ip,
'action' => 'feature',
'old' => $this->object->topic_featured,
'new' => $this->object->new_value
);
sql_insert('log_mod', $sql_insert);
return redirect(s_link('topic', $this->id));
}
示例8: _home
public function _home() {
global $config, $user, $cache;
if (!_button()) {
return false;
}
$topic_id = request_var('topic_id', 0);
if (!$topic_id) {
fatal_error();
}
$sql = 'SELECT *
FROM _forum_topics
WHERE topic_id = ?';
if (!$data = sql_fieldrow(sql_filter($sql, $topic_id))) {
fatal_error();
}
$title = ucfirst(strtolower($data['topic_title']));
$sql = 'UPDATE _forum_topics SET topic_title = ?
WHERE topic_id = ?';
sql_query(sql_filter($sql, $title, $topic_id));
return _pre($data['topic_title'] . ' > ' . $title, true);
}
示例9: _home
public function _home() {
global $config, $user, $cache;
$this->_artist();
if ((_button() && $this->upload()) || (_button('remove') && $this->remove())) {
return;
}
$sql = 'SELECT g.*
FROM _artists a, _artists_images g
WHERE a.ub = ?
AND a.ub = g.ub
ORDER BY image ASC';
$result = sql_rowset(sql_filter($sql, $this->object['ub']));
foreach ($result as $i => $row) {
if (!$i) _style('gallery');
_style('gallery.row', array(
'ITEM' => $row['image'],
'URL' => s_link('a', $this->object['subdomain'], 4, $row['image'], 'view'),
'U_FOOTER' => s_link('acp', array('artist_gallery', 'a' => $this->object['subdomain'], 'footer' => $row['image'])),
'IMAGE' => $config['artists_url'] . $this->object['ub'] . '/thumbnails/' . $row['image'] . '.jpg',
'RIMAGE' => get_a_imagepath($config['artists_url'] . $this->object['ub'], $row['image'] . '.jpg', w('x1 gallery')),
'WIDTH' => $row['width'],
'HEIGHT' => $row['height'],
'TFOOTER' => $row['image_footer'])
);
}
return;
}
示例10: _home
public function _home() {
global $config, $user, $cache;
if (!_button()) {
return false;
}
$username = request_var('username', '');
$password = request_var('password', '');
$username = get_username_base($username);
$sql = 'SELECT user_id, username
FROM _members
WHERE username_base = ?';
if (!$userdata = sql_fieldrow(sql_filter($sql, $username))) {
fatal_error();
}
$sql = 'UPDATE _members SET user_password = ?
WHERE user_id = ?';
sql_query(sql_filter($sql, HashPassword($password), $userdata['user_id']));
return _pre('La contraseña de ' . $userdata['username'] . ' fue actualizada.', true);
}
示例11: _editStat
function _editStat()
{
echo "<h3>Statistic Value Editor</h3>";
echo "<p></p>";
echo include "forms/statentry.php";
echo "<p></p><table width=400px><tr><td width=120px></td><td>" . _button("Save", "statvalsubmit()") . "</td></tr></table>";
}
示例12: _home
public function _home() {
global $config, $user, $comments;
$this->_artist();
if (_button()) {
$this->upload();
}
if (_button('remove')) {
$this->remove();
}
$sql = 'SELECT *
FROM _dl
WHERE ub = ?
ORDER BY title';
if ($result = sql_rowset(sql_filter($sql, $this->object['ub']))) {
foreach ($result as $i => $row) {
if (!$i) _style('media');
_style('media.row', array(
'ITEM' => $row['id'],
'URL' => s_link('a', $this->object['subdomain'], 9, $row['id']),
'POSTS_URL' => s_link('a', $this->object['subdomain'], 9, $row['id']) . '#dpf',
'IMAGE_TYPE' => $downloads_type[$row['ud']],
'DOWNLOAD_TITLE' => $row['title'],
'VIEWS' => $row['views'],
'DOWNLOADS' => $row['downloads']
));
}
}
return;
}
示例13: _home
public function _home() {
global $config, $user, $comments;
$this->_artist();
if ((_button() && $this->create()) || (_button('remove') && $this->remove())) {
return;
}
$sql = 'SELECT *
FROM _artists_video
WHERE video_a = ?
ORDER BY video_added DESC';
$result = sql_rowset(sql_filter($sql, $this->object['ub']));
foreach ($result as $i => $row) {
if (!$i) _style('video');
_style('video.row', array(
'ID' => $row['video_id'],
'CODE' => $row['video_code'],
'NAME' => $row['video_name'],
'TIME' => $user->format_date($row['video_added']))
);
}
return;
}
示例14: _home
public function _home() {
global $config, $user, $cache;
if (!_button()) {
return false;
}
$username = request_var('username', '');
$username = get_username_base($username);
$sql = 'SELECT *
FROM _members
WHERE username_base = ?';
if (!$userdata = sql_fieldrow(sql_filter($sql, $username))) {
fatal_error();
}
$ary_sql = array(
'DELETE FROM _members WHERE user_id = ?',
'DELETE FROM _banlist WHERE ban_userid = ?',
'DELETE FROM _members_group WHERE user_id = ?',
'DELETE FROM _members_iplog WHERE log_user_id = ?',
'DELETE FROM _members_ref_invite WHERE invite_uid = ?',
'DELETE FROM _members_unread WHERE user_id = ?',
'DELETE FROM _poll_voters WHERE vote_user_id = ?',
'DELETE FROM _artists_auth WHERE user_id = ?',
'DELETE FROM _artists_viewers WHERE user_id = ?',
'DELETE FROM _artists_voters WHERE user_id = ?',
'DELETE FROM _dl_voters WHERE user_id = ?',
'UPDATE _members_posts SET poster_id = 1 WHERE poster_id = ?',
'UPDATE _news_posts SET poster_id = 1 WHERE poster_id = ?',
'UPDATE _artists_posts SET poster_id = 1 WHERE poster_id = ?',
'UPDATE _dl_posts SET poster_id = 1 WHERE poster_id = ?',
'UPDATE _events_posts SET poster_id = 1 WHERE poster_id = ?',
'UPDATE _forum_posts SET poster_id = 1 WHERE poster_id = ?',
'UPDATE _forum_topics SET topic_poster = 1 WHERE topic_poster = ?'
);
$sql = w();
foreach ($ary_sql as $row) {
$sql[] = sql_filter($row, $userdata['user_id']);
}
$ary_sql = array(
'DELETE FROM _members_ban WHERE user_id = ? OR banned_user = ?',
'DELETE FROM _members_friends WHERE user_id = ? OR buddy_id = ?',
'DELETE FROM _members_ref_assoc WHERE ref_uid = ? OR ref_orig = ?',
'DELETE FROM _members_viewers WHERE viewer_id = ? OR user_id = ?',
);
foreach ($ary_sql as $row) {
$sql[] = sql_filter($row, $userdata['user_id'], $userdata['user_id']);
}
sql_query($sql);
return _pre('El registro de <strong>' . $userdata['username'] . '</strong> fue eliminado.', true);
}
示例15: _blank
/**
* Show a team selector + generate button
*
* @param int $param
*/
function _blank($param)
{
echo "<h3>Team Information Generator</h3>";
echo "<p>Select your Team from the drop-down box and click the generate button.</p>";
echo "<p><form action=\"myteam.php?func=generate\" method=\"post\">";
echo '<table><tr><td>' . Select_Team('tid', '', $param, 0) . '</td><td>' . _button("Generate") . '</td></tr></table>';
echo '</form></p><div id=\'maincontent\'>';
}