本文整理汇总了PHP中is_id函数的典型用法代码示例。如果您正苦于以下问题:PHP is_id函数的具体用法?PHP is_id怎么用?PHP is_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_id函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: main
public function main()
{
$page = Request::get(0, VAR_URI);
if (preg_match('/^(\\d+)-/', $page, $matches) > 0 && !empty($matches[1])) {
$airlineData = new CustomData($this->airlinePage->getPosition());
if ($airlineData->load($matches[1])) {
$uri = AirlineTools::buildUri($airlineData->getId(), $airlineData->getData('name'), true);
$this->flightPage->setBaseUri($uri);
$this->breadcrumb->add($airlineData->getData('name'), URI::build($uri));
$flight = Request::get(1, VAR_INT);
if (is_id($flight)) {
$this->flight($flight);
} else {
$this->airline($matches[1]);
}
} else {
$this->header();
$this->notFoundError();
$this->footer();
}
} else {
$this->header();
$this->airlinePage->overview('/Airlines/categories');
$this->footer();
}
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:26,代码来源:class.AirlinePages.php
示例2: setPerPage
public function setPerPage($pp)
{
if (is_id($pp)) {
$this->perPage = $pp;
} else {
$this->perPage = 10;
}
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:8,代码来源:class.Pagination.php
示例3: patch
public function patch()
{
$this->model->id = (int) $this->app->request->uri->segment(1);
$this->model->name = trim($this->app->request->params->post['name']);
$this->model->price = trim($this->app->request->params->post['price']);
if (!is_id($this->model->id) || $this->model->name == '' || $this->model->price == '') {
$this->app->response->setStatus(Status::BAD_REQUEST);
return;
}
if (!$this->model->find()) {
$this->app->response->setStatus(Status::NOT_FOUND);
return;
}
$result = $this->model->save();
if (is_int($result)) {
return ['ok' => true, 'id' => $this->model->id];
}
return ['ok' => false, 'id' => null];
}
开发者ID:froq,项目名称:froq-beta-archive,代码行数:19,代码来源:BookService.php
示例4: initAdmin
function initAdmin($dir = null)
{
global $admconfig, $my;
if (!empty($my->settings['default_language'])) {
$dir = $my->settings['default_language'];
} elseif (is_id($admconfig['default_language'])) {
$dir = $admconfig['default_language'];
}
if ($dir != null) {
$this->setdir($dir);
}
$this->group('settings');
$this->group('admin/global');
$this->group('modules');
$this->group('custom');
@ini_set('default_charset', '');
if (!headers_sent()) {
viscacha_header('Content-type: text/html; charset=' . $this->charset());
}
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:20,代码来源:class.language.php
示例5: get_remote
function get_remote($file)
{
if (!class_exists('Snoopy')) {
include 'classes/class.snoopy.php';
}
if (!preg_match('/^(http:\\/\\/)([\\wäöüÄÖÜ@\\-_\\.]+)\\:?([0-9]*)\\/(.*)$/', $file, $url_ary)) {
return REMOTE_INVALID_URL;
}
$snoopy = new Snoopy();
if (is_id($url_ary[3])) {
$snoopy->port = $url_ary[3];
} else {
$snoopy->port = null;
}
$status = $snoopy->fetch($file);
if ($status == true) {
return $snoopy->results;
} else {
return REMOTE_CLIENT_ERROR;
}
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:21,代码来源:function.global.php
示例6: load
function load()
{
global $db, $gpc;
if ($this->exists() == true) {
$this->import();
} else {
$this->data = array();
$result = $db->query("SELECT id, name FROM {$db->pre}user", __LINE__, __FILE__);
while ($row = $db->fetch_assoc($result)) {
$this->data[$row['id']] = $gpc->prepare($row['name']);
}
$olduserdata = file('data/deleteduser.php');
foreach ($olduserdata as $row) {
$row = trim($row);
if (!empty($row)) {
$row = explode("\t", $row);
if (is_id($row[0])) {
$this->data[$row[0]] = $row[1];
}
}
}
$this->export();
}
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:24,代码来源:memberdata.inc.php
示例7: error
$error[] = $lang->phrase('editprofile_fullname_incorrect');
}
if (count($error) > 0) {
error($error, "editprofile.php?action=profile" . SID2URL_x);
} else {
// Now we create the birthday...
if (!$_POST['birthmonth'] && !$_POST['birthday'] && !$_POST['birthyear']) {
$bday = '0000-00-00';
} else {
$_POST['birthmonth'] = leading_zero($_POST['birthmonth']);
$_POST['birthday'] = leading_zero($_POST['birthday']);
$_POST['birthyear'] = leading_zero($_POST['birthyear'], 4);
$bday = $_POST['birthyear'] . '-' . $_POST['birthmonth'] . '-' . $_POST['birthday'];
}
$_POST['icq'] = str_replace('-', '', $_POST['icq']);
if (!is_id($_POST['icq'])) {
$_POST['icq'] = 0;
}
if ($config['changename_allowed'] == 1) {
$changename = ", name = '{$_POST['name']}'";
} else {
$changename = '';
}
$db->query("UPDATE {$db->pre}user SET icq = '{$_POST['icq']}', yahoo = '{$_POST['yahoo']}', aol = '{$_POST['aol']}', msn = '{$_POST['msn']}', jabber = '{$_POST['jabber']}', birthday = '{$bday}', gender = '{$_POST['gender']}', hp = '{$_POST['hp']}', signature = '{$_POST['signature']}', location = '{$_POST['location']}', fullname = '{$_POST['fullname']}', mail = '{$_POST['email']}'{$changename} WHERE id = '{$my->id}' LIMIT 1", __LINE__, __FILE__);
ok($lang->phrase('data_success'), "editprofile.php?action=profile" . SID2URL_x);
}
} elseif ($_GET['action'] == "settings") {
$breadcrumb->Add($lang->phrase('editprofile_settings'));
echo $tpl->parse("header");
echo $tpl->parse("menu");
$design = cache_loaddesign();
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:editprofile.php
示例8: array
if ($vword->check_session($_POST['captcha'], $_POST['letter']) == FALSE) {
$error[] = $lang->phrase('veriword_mistake');
} else {
$human = array('captcha' => $_POST['captcha'], 'letter' => $_POST['letter']);
}
} else {
$error[] = $lang->phrase('veriword_failed');
}
}
if (!check_mail($_POST['email']) && ($config['guest_email_optional'] == 0 || !empty($_POST['email']))) {
$error[] = $lang->phrase('illegal_mail');
}
if (double_udata('name', $_POST['name']) == false) {
$error[] = $lang->phrase('username_registered');
}
if (is_id($_POST['name'])) {
$error[] = $lang->phrase('username_registered');
}
if (strxlen($_POST['name']) > $config['maxnamelength']) {
$error[] = $lang->phrase('name_too_long');
}
if (strxlen($_POST['name']) < $config['minnamelength']) {
$error[] = $lang->phrase('name_too_short');
}
if (strxlen($_POST['email']) > 200) {
$error[] = $lang->phrase('email_too_long');
}
$pname = $_POST['name'];
$pnameid = $_POST['name'];
$pid = 0;
} else {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:addreply.php
示例9: updatelogged
/**
* Function that updates the user and session data after the script finished.
*/
function updatelogged () {
global $my, $db, $gpc, $plugins;
if (!isset($my->pwfaccess) || !is_array($my->pwfaccess)) {
$my->pwfaccess = array();
}
if (!isset($my->settings) || !is_array($my->settings)) {
$my->settings = array();
}
if (!isset($my->mark) || !is_array($my->mark)) {
$my->mark = array();
}
$serialized = $db->escape_string(serialize($my->mark));
$serializedpwf = $db->escape_string(serialize($my->pwfaccess));
$serializedstg = $db->escape_string(serialize($my->settings));
$sqlwhere = $sqlset = array();
if ($my->id > 0 && !is_id($this->change_mid)) {
$sqlwhere[] = "mid = '{$my->id}'";
}
else {
$sqlwhere[] = "sid = '{$this->sid}'";
}
$action = $gpc->get('action', str);
$qid = $gpc->get('id', int);
if (is_id($this->change_mid)) {
$sqlset[] = "mid = '{$this->change_mid}'";
}
($code = $plugins->load('permissions_updatelogged_query')) ? eval($code) : null;
$sqlset = iif(count($sqlset) > 0, ', ').implode(', ', $sqlset);
$sqlwhere2 = implode(', ', $sqlwhere);
if (count($sqlwhere) > 0) {
$db->query ("
UPDATE {$db->pre}session
SET mark = '{$serialized}', wiw_script = '".SCRIPTNAME."', wiw_action = '{$action}', wiw_id = '{$qid}', active = '".time()."',
pwfaccess = '{$serializedpwf}', settings = '{$serializedstg}', lastvisit = '{$my->clv}' {$sqlset}
WHERE {$sqlwhere2}
LIMIT 1
");
}
if ($my->vlogin) {
// Eigentlich könnten wir uns das Updaten der User-Lastvisit-Spalte sparen, für alle User die Cookies nutzen. Einmal, am Anfang der Session würde dann reichen
$db->query("UPDATE {$db->pre}user SET lastvisit = '".time()."' WHERE id = '{$my->id}'");
}
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:52,代码来源:class.permissions.php
示例10: array
if (!isset($ratings[$row->id])) {
$ratings[$row->id] = array();
}
if ($my->vlogin && $my->id != $row->mid && !isset($ratings[$row->id][$my->id])) {
$showrating = true;
}
$ratingcounter = count($ratings[$row->id]);
if (count($ratings[$row->id]) > 0) {
$row->rating = round(array_sum($ratings[$row->id]) / $ratingcounter * 50) + 50;
}
}
($code = $plugins->load('showtopic_entry_prepared')) ? eval($code) : null;
$inner['index_bit'][] = $tpl->parse("showtopic/index_bit");
($code = $plugins->load('showtopic_entry_added')) ? eval($code) : null;
}
if ($my->vlogin && is_id($info['id'])) {
$result = $db->query("SELECT id, type FROM {$db->pre}abos WHERE mid = '{$my->id}' AND tid = '{$info['id']}'");
$abox = $db->fetch_assoc($result);
} else {
$abox = array('id' => null, 'type' => null);
}
$inner['index_bit'] = implode('', $inner['index_bit']);
($code = $plugins->load('showtopic_prepared')) ? eval($code) : null;
echo $tpl->parse("showtopic/index");
$slog->setTopicRead($info['id'], $topforums);
($code = $plugins->load('showtopic_end')) ? eval($code) : null;
$slog->updatelogged();
$zeitmessung = t2();
echo $tpl->parse("footer");
$phpdoc->Out();
$db->close();
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:showtopic.php
示例11: while
while ($row = $gpc->prepare($db->fetch_object($result))) {
$pref = '';
$showprefix = false;
if (isset($prefix_arr[$row->prefix]) && $row->prefix > 0) {
$prefix = $prefix_arr[$row->prefix]['value'];
$showprefix = true;
} else {
$prefix = '';
}
if (is_id($row->name) && isset($memberdata[$row->name])) {
$row->mid = $row->name;
$row->name = $memberdata[$row->name];
} else {
$row->mid = FALSE;
}
if (is_id($row->last_name) && isset($memberdata[$row->last_name])) {
$row->last_name = $memberdata[$row->last_name];
}
$rstart = str_date('d.m.Y H:i', times($row->date));
$rlast = str_date('d.m.Y H:i', times($row->last));
if ($row->status == '2') {
$pref .= $lang->phrase('forum_moved');
} else {
if (empty($row->mark) && !empty($info['auto_status'])) {
$row->mark = $info['auto_status'];
}
if ($row->mark == 'n') {
$pref .= 'News: ';
} elseif ($row->mark == 'a') {
$pref .= 'Artcle: ';
} elseif ($row->mark == 'b') {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:posts.php
示例12: manageconfig
}
echo "- Database class loaded and initialized.<br />";
// Config
$c = new manageconfig();
$c->getdata('data/config.inc.php');
$c->updateconfig('version', str, VISCACHA_VERSION);
$c->savedata();
echo "- Configuration updated.<br />";
// Languages
$ini = array('settings' => array('language_de' => array('compatible_version' => VISCACHA_VERSION), 'language' => array('compatible_version' => VISCACHA_VERSION)), 'admin/frames' => array('language_de' => array('admin_scheduler_log' => 'Protokoll der geplanten Aufgaben')), 'classes' => array('language_de' => array('mailer_encoding' => 'Unbekanntes Encoding-Format: ', 'mailer_execute' => 'Konnte folgenden Befehl nicht ausführen: ', 'mailer_file_access' => 'Zugriff auf folgende Datei fehlgeschlagen: ', 'mailer_file_open' => 'Datei Fehler: Konnte folgende Datei nicht öffnen: ', 'mailer_from_failed' => 'Die folgende Absenderadresse ist nicht korrekt: ', 'mailer_recipients_failed' => 'SMTP Fehler: Die folgenden Empfänger sind nicht korrekt: ', 'mailer_signing' => 'Fehler beim Signieren: ', 'mailer_empty_message' => 'E-Mail Inhalt ist leer.', 'mailer_invalid_address' => 'E-Mail wird nicht gesendet, die Adresse ist ungültig.', 'mailer_smtp_connect_failed' => 'Verbindung zu SMTP Server fehlgeschlagen.', 'mailer_smtp_error' => 'Fehler vom SMTP Server: ', 'mailer_variable_set' => 'Kann Variable nicht setzen oder zurücksetzen: '), 'language' => array('mailer_authenticate' => 'SMTP Error: Could not authenticate.', 'mailer_connect_host' => 'SMTP Error: Could not connect to SMTP host.', 'mailer_data_not_accepted' => 'SMTP Error: Data not accepted.', 'mailer_encoding' => 'Unknown encoding: ', 'mailer_execute' => 'Could not execute: ', 'mailer_file_access' => 'Could not access file: ', 'mailer_file_open' => 'File Error: Could not open file: ', 'mailer_from_failed' => 'The following From address failed: ', 'mailer_instantiate' => 'Could not instantiate mail function.', 'mailer_mailer_not_supported' => ' mailer is not supported.', 'mailer_provide_address' => 'You must provide at least one recipient email address.', 'mailer_recipients_failed' => 'SMTP Error: The following recipients failed: ', 'mailer_empty_message' => 'Message body empty', 'mailer_invalid_address' => 'Invalid address', 'mailer_smtp_connect_failed' => 'SMTP Connect() failed.', 'mailer_smtp_error' => 'SMTP server error: ', 'mailer_variable_set' => 'Cannot set or reset variable: ')), 'global' => array('language_de' => array('digest_d' => 'Tägliche E-Mail-Benachrichtigung', 'digest_none' => 'Keine Benachrichtigung', 'img_captcha_session_expired_error' => 'Seite aktualisieren', 'digest_f' => 'Nur Favorit'), 'language' => array('digest_none' => 'No notification', 'img_captcha_session_expired_error' => 'Refresh page', 'digest_f' => 'Favorite only')));
updateLanguageFiles($ini);
echo "- Language files updated.<br />";
$newCss = file_get_contents('temp/standard.css');
$dir = dir('designs');
while (false !== ($entry = $dir->read())) {
if (is_id($entry)) {
$path = "{$dir->path}/{$entry}/standard.css";
$css = file_get_contents($path);
if (!empty($css)) {
$css .= $newCss;
if (!$filesystem->file_put_contents($path, $css)) {
$css = null;
}
}
if (empty($css)) {
echo "<br />!!! <strong>Warning:</strong> Updating {$path} failed. Plase add the following CSS code to your main css file in designs/{$entry}:<br /><code>";
echo htmlentities($newCss);
echo "</code><br /><br />";
}
}
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:5.php
示例13: BoardSelect
function BoardSelect($board = 0)
{
global $config, $my, $tpl, $db, $gpc, $lang, $scache, $plugins, $slog;
$found = false;
$sub_cache = $forum_cache = $last_cache = $forums = $cat = array();
$categories_obj = $scache->load('categories');
$cat_cache = $categories_obj->get();
$memberdata_obj = $scache->load('memberdata');
$memberdata = $memberdata_obj->get();
$index_moderators = $scache->load('index_moderators');
$mod_cache = $index_moderators->get();
$prefix_obj = $scache->load('prefix');
$prefix = $prefix_obj->get();
($code = $plugins->load('forums_query')) ? eval($code) : null;
// Fetch Forums
$result = $db->query("\n\tSELECT\n\t\tf.id, f.name, f.description, f.opt, f.optvalue, f.parent, f.topics, f.replies, f.last_topic, f.invisible,\n\t\tt.topic as l_topic, t.prefix AS l_prefix, t.id as l_tid, t.last as l_date, u.name AS l_uname, t.last_name AS l_name, f.id AS l_bid\n\tFROM {$db->pre}forums AS f\n\t\tLEFT JOIN {$db->pre}topics AS t ON f.last_topic=t.id\n\t\tLEFT JOIN {$db->pre}user AS u ON t.last_name=u.id\n\tORDER BY f.parent, f.position\n\t");
$keys = array('l_prefix' => null, 'l_topic_full' => null, 'l_topic' => null, 'l_tid' => null, 'l_date' => null, 'l_uname' => null, 'l_name' => null, 'l_bid' => null);
while ($row = $db->fetch_assoc($result)) {
$row['name'] = $gpc->prepare($row['name']);
$row['l_uname'] = $gpc->prepare($row['l_uname']);
$row['l_name'] = $gpc->prepare($row['l_name']);
$row['bid'] = $cat_cache[$row['parent']]['parent'];
// Caching for Subforums
if (!empty($row['bid'])) {
$sub_cache[$row['bid']][] = $row;
}
// Caching the Forums
if ($row['bid'] == $board) {
$forum_cache[$row['parent']][] = $row;
}
$last_cache[$row['id']] = $row;
($code = $plugins->load('forums_caching')) ? eval($code) : null;
}
$cats = array();
$hidden = 0;
// Work with the chached data!
foreach ($cat_cache as $cat) {
$cat['forums'] = array();
if (isset($forum_cache[$cat['id']]) == false) {
continue;
}
foreach ($forum_cache[$cat['id']] as $forum) {
$found = true;
$forum['new'] = false;
$forum['show'] = true;
// Subforendaten vererben (Letzter Beitrag, Markierung)
if (isset($sub_cache[$forum['id']])) {
$substats = SubStats($forum['topics'], $forum['replies'], $forum['id'], $sub_cache);
$forum['topics'] = $substats[0];
$forum['replies'] = $substats[1];
}
// Letzter Beitrag
$last = $last_cache[$forum['id']];
if (isset($sub_cache[$forum['id']])) {
foreach ($substats[2] as $last_bid) {
$sub = $last_cache[$last_bid];
if ($last['l_date'] < $sub['l_date'] && check_forumperm($sub)) {
$last = $sub;
}
}
}
$forum = array_merge($forum, array_intersect_key($last, $keys));
if (is_id($forum['l_name']) && isset($memberdata[$forum['l_name']])) {
$forum['l_name'] = array($forum['l_uname'], $forum['l_name']);
} else {
$forum['l_name'] = array($forum['l_name'], 0);
}
// Rechte und Gelesensystem
if ($forum['opt'] != 're') {
if (!check_forumperm($forum)) {
if ($forum['invisible'] != 0) {
$forum['show'] = false;
}
$forum['foldimg'] = $tpl->img('cat_locked');
$forum['state'] = BOARD_STATE_LOCKED;
$forum['topics'] = '-';
$forum['replies'] = '-';
$forum['l_topic'] = false;
$forum['l_topic_full'] = '';
} else {
if ($slog->isForumRead($forum['id'], $forum['l_date']) || $forum['topics'] < 1) {
$forum['foldimg'] = $tpl->img('cat_open');
$forum['state'] = BOARD_STATE_OLD;
} else {
$forum['foldimg'] = $tpl->img('cat_red');
$forum['state'] = BOARD_STATE_NEW;
$forum['new'] = true;
}
if (!empty($forum['l_topic'])) {
if (isset($prefix[$forum['id']][$forum['l_prefix']]) && $forum['l_prefix'] > 0) {
$lang->assign('prefix', $prefix[$forum['id']][$forum['l_prefix']]['value']);
$forum['l_prefix'] = $lang->phrase('showtopic_prefix_title');
} else {
$forum['l_prefix'] = '';
}
if (strxlen($forum['l_topic']) > $config['lasttopic_chars']) {
$forum['l_topic_full'] = $forum['l_prefix'] . $forum['l_topic'];
$forum['l_topic'] = subxstr($forum['l_topic'], 0, $config['lasttopic_chars']);
$forum['l_topic'] .= "...";
} else {
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:101,代码来源:function.viscacha_frontend.php
示例14: foot
echo $lang->phrase('admin_cms_form_edit');
?>
"></td>
</tr>
</table>
</form>
<?php
echo foot();
} elseif ($job == 'feed_edit2') {
echo head();
$title = $gpc->get('temp1', str);
$file = $gpc->get('temp2', db_esc);
$entries = $gpc->get('value', int);
$id = $gpc->get('id', int);
$max_age = $gpc->get('max_age', int);
if (!is_id($id)) {
error('admin.php?action=cms&job=feed', $lang->phrase('admin_cms_invalid_id_given'));
}
if (empty($title)) {
error('admin.php?action=cms&job=feed_edit&id=' . $id, $lang->phrase('admin_cms_no_title_specified'));
}
if (empty($file)) {
error('admin.php?action=cms&job=feed_edit&id=' . $id, $lang->phrase('admin_cms_no_url_specified'));
}
if (empty($entries)) {
$entries = 0;
}
if (empty($max_age)) {
$max_age = 60 * 12;
}
$db->query("UPDATE {$db->pre}grab SET file = '{$file}', title = '{$title}', entries = '{$entries}', max_age = '{$max_age}' WHERE id = '{$id}'");
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:cms.php
示例15: getDocLangID
function getDocLangID($data)
{
global $my, $config;
if (isset($my->language) && is_id($my->language) && isset($data[$my->language])) {
return $my->language;
// Best case: Language specified by the user
} elseif (is_id($config['doclang']) && isset($data[$config['doclang']])) {
return $config['doclang'];
// Normal Case: Standard language specified for documents
} elseif (is_id($config['langdir']) && isset($data[$config['langdir']])) {
return $config['langdir'];
// Worse Case: Standard language of the page
} else {
reset($data);
return key($data);
// Worst Case: Take another language... let's say just the first in the list?!
}
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:18,代码来源:function.global.php
示例16: error
$query['pic'] = '';
}
if (count($error) > 0) {
error('admin.php?action=members&job=edit&id=' . $query['id'], $error);
} else {
// Now we create the birthday...
if (!$query['birthmonth'] && !$query['birthday'] && !$query['birthyear']) {
$bday = '0000-00-00';
} else {
$query['birthmonth'] = leading_zero($query['birthmonth']);
$query['birthday'] = leading_zero($query['birthday']);
$query['birthyear'] = leading_zero($query['birthyear'], 4);
$bday = $query['birthyear'] . '-' . $query['birthmonth'] . '-' . $query['birthday'];
}
$query['icq'] = str_replace('-', '', $query['icq']);
if (!is_id($query['icq'])) {
$query['icq'] = 0;
}
$pw = $gpc->get('pw', none);
if (!empty($pw) && strlen($pw) >= $config['minpwlength']) {
$md5 = md5($pw);
$update_sql = ", pw = '{$md5}' ";
} else {
$update_sql = ' ';
}
$db->query("UPDATE {$db->pre}user SET groups = '" . $query['groups'] . "', timezone = '" . $query['temp'] . "', opt_textarea = '" . $query['opt_0'] . "', opt_pmnotify = '" . $query['opt_1'] . "', opt_hidebad = '" . $query['opt_2'] . "', opt_hidemail = '" . $query['opt_3'] . "', template = '" . $query['opt_4'] . "', language = '" . $query['opt_5'] . "', pic = '" . $query['pic'] . "', about = '" . $query['comment'] . "', icq = '" . $query['icq'] . "', yahoo = '" . $query['yahoo'] . "', aol = '" . $query['aol'] . "', msn = '" . $query['msn'] . "', jabber = '" . $query['jabber'] . "', birthday = '" . $bday . "', gender = '" . $query['gender'] . "', hp = '" . $query['hp'] . "', signature = '" . $query['signature'] . "', location = '" . $query['location'] . "', fullname = '" . $query['fullname'] . "', mail = '" . $query['email'] . "', name = '" . $query['name'] . "'" . $update_sql . " WHERE id = '" . $user['id'] . "' LIMIT 1", __LINE__, __FILE__);
ok("admin.php?action=members&job=manage", 'Daten erfolgreich gespeichert!');
}
} elseif ($job == 'delete') {
echo head();
$delete = $gpc->get('delete', arr_int);
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:members.php
示例17: foot
" /></td>
</tr>
<?php
}
?>
<tr>
<td class="ubox" colspan="2" align="center"><input type="submit" name="Submit" value="Save" /></td>
</tr>
</table>
</form>
<?php
echo foot();
} elseif ($job == 'package_updates') {
$id = $gpc->get('id', int);
echo head();
if (is_id($id)) {
$result = $db->query("SELECT internal, version FROM {$db->pre}packages WHERE id = '{$id}'");
$data = $db->fetch_assoc($result);
if (empty($data['version'])) {
error('admin.php?action=packages&job=package', $lang->phrase('admin_packages_err_no_information_about_the_current_version_found'));
}
$pb = $scache->load('package_browser');
$row = $pb->getOne(IMPTYPE_PACKAGE, $data['internal']);
if ($row !== false && !empty($row['version'])) {
if (version_compare($row['version'], $data['version'], '>')) {
ok('admin.php?action=packages&job=browser_detail&id=' . $row['internal'] . '&package=' . IMPTYPE_PACKAGE, $lang->phrase('admin_packages_ok_there_is_a_new_version_foo_on_the_server'), 3000);
} else {
ok('admin.php?action=packages&job=package_info&id=' . $id, $lang->phrase('admin_packages_ok_this_package_seems_to_be_up_to_date'), 3000);
}
break;
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:packages.php
示例18: elseif
$furl = $https . $server_name . '/' . $source;
}
if (empty($config['forenmail']) == false) {
$email = $config['forenmail'];
} elseif (isset($_SERVER['SERVER_ADMIN'])) {
$email = $_SERVER['SERVER_ADMIN'];
} else {
$email = '';
}
// Determine path to script
$fpath = !empty($config['fpath']) ? $config['fpath'] : str_replace('\\', '/', realpath('./'));
$langarr = array();
$d = dir('language/');
while (false !== ($entry = $d->read())) {
$dir = $d->path . DIRECTORY_SEPARATOR . $entry;
if (is_id($entry) && is_dir($dir)) {
$name = getLangNameByPath($dir);
$langarr[$entry] = $name;
}
}
$d->close();
?>
<div class="bbody">
<input type="hidden" name="save" value="1" />
<table class="tables">
<tr>
<td class="mbox" width="50%">Site name:<br /><span class="stext">Maximum: 64 characters</span></td>
<td class="mbox" width="50%"><input type="text" name="fname" value="<?php
echo $config['fname'];
?>
" size="50" /></td>
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:5.php
示例19: iif
$row['comment'] = $bbcode->censor(trim($row['comment']));
$data['comment'] .= "\r\n[quote" . iif(!empty($row['name']), "=" . $row['name']) . "]";
$data['comment'] .= $row['comment'];
$data['comment'] .= "[/quote]\r\n";
}
}
}
if ($config['botgfxtest_posts'] == 1 && is_null($data['human']) == true) {
include "classes/graphic/class.veriword.php";
$vword = new VeriWord();
$veriid = $vword->set_veriword($config['botgfxtest_text_verification']);
if ($config['botgfxtest_text_verification'] == 1) {
$textcode = $vword->output_word($veriid);
}
}
if ($my->vlogin && is_id($_GET['id'])) {
$result = $db->query("SELECT id FROM {$db->pre}abos WHERE mid = '{$my->id}' AND tid = '{$_GET['id']}'", __LINE__, __FILE__);
$abox = $db->fetch_assoc($result);
} else {
$abox = array('id' => null);
}
$inner['smileys'] = $bbcode->getsmileyhtml($config['smileysperrow']);
$inner['bbhtml'] = $bbcode->getbbhtml();
echo $tpl->parse("header");
echo $tpl->parse("menu");
($code = $plugins->load('addreply_form_prepared')) ? eval($code) : null;
echo $tpl->parse("addreply");
($code = $plugins->load('addreply_form_end')) ? eval($code) : null;
}
($code = $plugins->load('addreply_end')) ? eval($code) : null;
$slog->updatelogged();
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:addreply.php
示例20: getViscachaCHMODs
function getViscachaCHMODs()
{
$chmod = array(array('path' => '.htaccess', 'chmod' => CHMOD_WR, 'recursive' => false, 'req' => false), array('path' => 'admin/backup', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => false), array('path' => 'admin/data/bbcode_test.php', 'chmod' => CHMOD_WR, 'recursive' => false, 'req' => false), array('path' => 'admin/data/config.inc.php', 'chmod' => CHMOD_WR, 'recursive' => false, 'req' => false), array('path' => 'admin/data/hooks.txt', 'chmod' => CHMOD_WR, 'recursive' => false, 'req' => false), array('path' => 'admin/html', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => true), array('path' => 'data', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => true), array('path' => 'data/cron', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => true), array('path' => 'data', 'chmod' => CHMOD_WR, 'recursive' => true, 'req' => true), array('path' => 'cache', 'chmod' => CHMOD_EX, 'recursive' => true, 'req' => true), array('path' => 'cache', 'chmod' => CHMOD_WR, 'recursive' => true, 'req' => false), array('path' => 'classes/cron/jobs', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => false), array('path' => 'classes/feedcreator', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => false), array('path' => 'classes/fonts', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => false), array('path' => 'classes/geshi', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => false), array('path' => 'classes/graphic/noises', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => false), array('path' => 'feeds', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => true), array('path' => 'feeds', 'chmod' => CHMOD_WR, 'recursive' => true, 'req' => true), array('path' => 'images', 'chmod' => CHMOD_EX, 'recursive' => true, 'req' => false), array('path' => 'modules', 'chmod' => CHMOD_EX, 'recursive' => true, 'req' => false), array('path' => 'modules', 'chmod' => CHMOD_WR, 'recursive' => true, 'req' => false), array('path' => 'temp', 'chmod' => CHMOD_EX, 'recursive' => true, 'req' => true), array('path' => 'templates', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => true), array('path' => 'uploads', 'chmod' => CHMOD_EX, 'recursive' => true, 'req' => true));
$path = 'language';
$dh = opendir($path);
while ($file = readdir($dh)) {
$fullpath = $path . '/' . $file;
if ($file != '.' && $file != '..' && is_id($file) && is_dir($fullpath)) {
$chmod[] = array('path' => $fullpath . '/modules', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => false);
$chmod[] = array('path' => $fullpath, 'chmod' => CHMOD_WR, 'recursive' => true, 'req' => false);
}
}
closedir($dh);
$path = 'templates';
$dh = opendir($path);
while ($file = readdir($dh)) {
$fullpath = $path . '/' . $file;
if ($file != '.' && $file != '..' && is_id($file) && is_dir($fullpath)) {
$chmod[] = array('path' => $fullpath, 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => false);
$chmod[] = array('path' => $fullpath . '/modules', 'chmod' => CHMOD_EX, 'recursive' => false, 'req' => false);
$chmod[] = array('path' => $fullpath, 'chmod' => CHMOD_WR, 'recursive' => true, 'req' => false);
}
}
closedir($dh);
$path = 'designs';
$dh = opendir($path);
while ($file = readdir($dh)) {
$fullpath = $path . '/' . $file;
if ($file != '.' && $file != '..' && is_id($file) && is_dir($fullpath)) {
$dh2 = opendir($fullpath);
while ($file = readdir($dh2)) {
$stylesheet = $fullpath . '/' . $file;
if (preg_match('~\\.css$~i', $file)) {
$chmod[] = array('path' => $stylesheet, 'chmod' => CHMOD_WR, 'recursive' => false, 'req' => false);
}
}
closedir($dh2);
$chmod[] = array('path' => $fullpath, 'chmod' => CHMOD_EX, 'recursive' => true, 'req' => false);
}
}
closedir($dh);
return $chmod;
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:43,代码来源:function.chmod.php
注:本文中的is_id函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论