本文整理汇总了PHP中slog类的典型用法代码示例。如果您正苦于以下问题:PHP slog类的具体用法?PHP slog怎么用?PHP slog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了slog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: error_reporting
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'search');
define('VISCACHA_CORE', '1');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions();
$my->pb = $slog->GlobalPermissions();
if ($my->p['search'] == 0) {
error($lang->phrase('query_string_error'));
}
$breadcrumb->Add($lang->phrase('search'));
($code = $plugins->load('search_start')) ? eval($code) : null;
if ($_GET['action'] == "search") {
if ($config['floodsearch'] == 1) {
if (flood_protect() == FALSE) {
error($lang->phrase('flood_control'));
}
示例2: error_reporting
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'attachments');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
if ($config['tpcallow'] == 0 && $_GET['action'] == "thumbnail") {
include 'classes/graphic/class.thumbnail.php';
$thumb = new thumbnail();
$thumb->create_error('#0 ' . $lang->phrase('thumb_error'));
} elseif ($config['tpcallow'] == 0) {
error($lang->phrase('upload_switched_off'));
}
if ($_GET['action'] == "thumbnail") {
include 'classes/graphic/class.thumbnail.php';
$thumb = new thumbnail();
if (!$_GET['id']) {
$thumb->create_error('#1 ' . $lang->phrase('thumb_error'));
示例3: error_reporting
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'showtopic');
define('VISCACHA_CORE', '1');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
($code = $plugins->load('showtopic_topic_query')) ? eval($code) : null;
$result = $db->query('
SELECT id, topic, posts, sticky, status, last, board, vquestion, prefix
FROM ' . $db->pre . 'topics
WHERE id = ' . $_GET['id'] . '
LIMIT 1
', __LINE__, __FILE__);
$info = $gpc->prepare($db->fetch_assoc($result));
$my->p = $slog->Permissions($info['board']);
$my->mp = $slog->ModPermissions($info['board']);
$error = array();
if ($db->num_rows($result) < 1) {
示例4: error_reporting
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'managetopic');
define('VISCACHA_CORE', '1');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$action = $gpc->get('action', none);
$result = $db->query('
SELECT board, mark, id, last_name, prefix, topic
FROM ' . $db->pre . 'topics
WHERE id = "' . $_GET['id'] . '"
LIMIT 1
', __LINE__, __FILE__);
if ($db->num_rows($result) != 1) {
error($lang->phrase('query_string_error'));
}
$info = $db->fetch_assoc($result);
$info['last_name'] = $gpc->prepare($info['last_name']);
示例5: error_reporting
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'images');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
if ($_GET['action'] == 'vote') {
$result = $db->query('SELECT id, topic, posts, sticky, status, last, board, vquestion, prefix FROM ' . $db->pre . 'topics WHERE id = ' . $_GET['id'] . ' LIMIT 1', __LINE__, __FILE__);
$info = $gpc->prepare($db->fetch_assoc($result));
require_once 'classes/class.charts.php';
$PG = new PowerGraphic();
$skin = $gpc->get('skin', int, 1);
$modus = $gpc->get('modus', int, 1);
$PG->title = $info['vquestion'];
$PG->axis_y = $lang->phrase('vote_export_votes');
$PG->type = $modus;
$PG->skin = $skin;
$PG->dp = $lang->phrase('decpoint');
$PG->ds = $lang->phrase('thousandssep');
示例6: preg_quote
$htaccess[] = "RewriteCond %{HTTP_HOST} ^www\\." . preg_quote($host) . "\$ [NC]";
$htaccess[] = "RewriteRule ^(.*)\$ http://" . $host . "/\$1 [R=301,L]";
$htaccess[] = "";
}
$filesystem->file_put_contents('.htaccess', implode("\r\n", $htaccess));
}
$breadcrumb = new breadcrumb();
$breadcrumb->Add($config['fname'], 'index.php');
$phpdoc = new OutputDoc($config['gzip']);
$phpdoc->Start($config['gzcompression']);
define('PAGE_IS_GZIPPED', $config['gzip'] == 1 && $phpdoc->Encoding());
($code = $plugins->load('frontend_init')) ? eval($code) : null;
// Global and important functions (not for cron and external)
if (defined('TEMPNOFUNCINIT') == false || $config['foffline'] && defined('TEMPSHOWLOG') == false) {
define('SCRIPT_START_TIME', benchmarktime());
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$slog->checkBan();
}
if ($config['foffline'] && defined('TEMPSHOWLOG') == false) {
$my->p = $slog->Permissions();
if ($my->p['admin'] != 1) {
$offline = file_get_contents('data/offline.php');
sendStatusCode(503, 3600);
($code = $plugins->load('frontend_init_offline')) ? eval($code) : null;
echo $tpl->parse("offline");
$phpdoc->Out();
$db->close();
exit;
示例7: error_reporting
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'admin');
include "data/config.inc.php";
include "admin/data/config.inc.php";
if (empty($config['cryptkey']) || empty($config['database']) || empty($config['dbsystem'])) {
trigger_error('Viscacha is currently not installed. How to install Viscacha is described in the file "_docs/readme.txt"!', E_USER_ERROR);
}
if (empty($config['dbpw']) || empty($config['dbuser'])) {
trigger_error('You have specified database authentification data that is not safe. Please change your database user and the database password!', E_USER_ERROR);
}
include "admin/lib/function.viscacha_backend.php";
$benchmark = benchmarktime();
$job = $gpc->get('job', str);
$slog = new slog();
$my = $slog->logged();
$my->p = $slog->Permissions();
if (!isset($my->settings['admin_interface'])) {
$my->settings['admin_interface'] = $admconfig['nav_interface'];
}
($code = $plugins->load('admin_start')) ? eval($code) : null;
if ($my->p['admin'] == 1) {
if ($action == "frames") {
include 'admin/frames.php';
} elseif ($action == 'index') {
include 'admin/start.php';
} elseif ($action == 'settings') {
include 'admin/settings.php';
} elseif ($action == 'spider') {
include 'admin/spider.php';
示例8: error_reporting
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'profile');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions();
$is_guest = false;
$is_member = false;
$url_ext = '';
$guest = $gpc->get('guest', int);
$memberdata_obj = $scache->load('memberdata');
$memberdata = $memberdata_obj->get();
if (isset($memberdata[$_GET['id']])) {
$username = $memberdata[$_GET['id']];
} else {
$username = $lang->phrase('fallback_no_username');
}
示例9: error_reporting
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'team');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions();
if ($my->p['team'] == 0) {
errorLogin();
}
$breadcrumb->Add($lang->phrase('team'));
echo $tpl->parse("header");
echo $tpl->parse("menu");
$mymodules->load('team_top');
$team = $slog->getTeamID();
$cache = array();
$t = array_merge($team['admin'], $team['gmod']);
foreach ($t as $row) {
示例10: error_reporting
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'newtopic');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$board = $gpc->get('id', int);
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions($board);
$catbid = $scache->load('cat_bid');
$fc = $catbid->get();
if (empty($board) || !isset($fc[$board])) {
error($lang->phrase('query_string_error'));
}
$last = $fc[$board];
forum_opt($last, 'posttopics');
if ($config['tpcallow'] == 1 && $my->p['attachments'] == 1) {
$p_upload = 1;
} else {
$p_upload = 0;
示例11: error_reporting
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'pm');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions();
if ($my->p['pm'] == 0 || !$my->vlogin) {
errorLogin();
}
$breadcrumb->Add($lang->phrase('editprofile_pm'), 'pm.php' . SID2URL_x);
if ($_GET['action'] == 'show') {
BBProfile($bbcode);
($code = $plugins->load('pm_show_query')) ? eval($code) : null;
$result = $db->query("\n\tSELECT p.dir, p.status, p.id, p.topic, p.comment, p.date, u.fullname, u.groups, u.hp, u.pic, u.mail, u.regdate, u.location, u.name, p.pm_from as mid \n\tFROM {$db->pre}pm AS p \n\t\tLEFT JOIN {$db->pre}user AS u ON p.pm_from=u.id \n\tWHERE p.pm_to = '" . $my->id . "' AND p.id = '{$_GET['id']}' \n\tORDER BY p.date ASC\n\t", __LINE__, __FILE__);
if ($db->num_rows() != 1) {
error($lang->phrase('query_string_error'), 'pm.php' . SID2URL_1);
}
示例12: error_reporting
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'external');
include "data/config.inc.php";
DEFINE('TEMPSHOWLOG', 1);
include "classes/function.viscacha_frontend.php";
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions();
$my->pb = $slog->GlobalPermissions();
if ($config['syndication'] == 0) {
errorLogin();
}
// Get the correct formatted timzone
$posneg = $my->timezone[0];
if ($posneg != '+' && $posneg != '-') {
$posneg = '+';
$mtz = $my->timezone;
} else {
$mtz = substr($my->timezone, 1);
示例13: error_reporting
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'log');
DEFINE('TEMPSHOWLOG', 1);
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions();
if ($_GET['action'] == "login2") {
$loc = strip_tags($gpc->get('location', none, 'index.php' . SID2URL_1));
$file = basename($loc);
if ($file = 'log.php') {
$loc = 'index.php' . SID2URL_1;
}
if ($my->vlogin) {
viscacha_header($loc);
}
if (!$slog->sid_login()) {
error($lang->phrase('log_wrong_data'), "log.php?action=login&location=" . urlencode($loc) . SID2URL_x);
示例14: tpl
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
ob_start();
include 'data/banned.php';
$banned = ob_get_contents();
ob_end_clean();
($code = $plugins->load('frontend_init_banned')) ? eval($code) : null;
echo $tpl->parse("banned");
$phpdoc->Out();
$db->close();
exit;
}
}
}
if ($config['foffline'] && defined('TEMPSHOWLOG') == false && SCRIPTNAME != 'external') {
$slog = new slog();
$my = $slog->logged();
$my->p = $slog->Permissions();
if ($my->p['admin'] != 1) {
$lang->init($my->language);
$tpl = new tpl();
$offline = file_get_contents('data/offline.php');
($code = $plugins->load('frontent_init_offline')) ? eval($code) : null;
echo $tpl->parse("offline");
$phpdoc->Out();
$db->close();
exit;
}
unset($slog, $my);
}
示例15: error_reporting
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'showforum');
define('VISCACHA_CORE', '1');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$board = $gpc->get('id', int);
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions($board);
$my->pb = $slog->GlobalPermissions();
$my->mp = $slog->ModPermissions($board);
$catbid = $scache->load('cat_bid');
$fc = $catbid->get();
if (empty($board) || !isset($fc[$board])) {
error($lang->phrase('query_string_error'));
}
$info = $fc[$board];
if ($my->p['admin'] == 1 || $my->p['gmod'] == 1 || $my->mp[0] == 1) {
$modcp = true;
} else {