当前位置: 首页>>代码示例>>PHP>>正文


PHP compatible_hsc函数代码示例

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


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

示例1: user_assign_visitors

function user_assign_visitors($object, $id, &$tmpl)
{
    global $apx, $set, $db, $user;
    $userdata = array();
    $data = $db->fetch("SELECT u.userid,u.username,u.groupid,u.realname,u.gender,u.city,u.plz,u.country,u.city,u.lastactive,u.pub_invisible,u.avatar,u.avatar_title,u.custom1,u.custom2,u.custom3,u.custom4,u.custom5,u.custom6,u.custom7,u.custom8,u.custom9,u.custom10 FROM " . PRE . "_user_visits AS v LEFT JOIN " . PRE . "_user AS u USING(userid) WHERE v.object='" . addslashes($object) . "' AND v.id='" . intval($id) . "' AND v.time>='" . (time() - 24 * 3600) . "' ORDER BY u.username ASC");
    if (count($data)) {
        foreach ($data as $res) {
            ++$i;
            $userdata[$i]['ID'] = $res['userid'];
            $userdata[$i]['USERID'] = $res['userid'];
            $userdata[$i]['USERNAME'] = replace($res['username']);
            $userdata[$i]['GROUPID'] = $res['groupid'];
            $userdata[$i]['ONLINE'] = iif(!$res['pub_invisible'] && $res['lastactive'] + $set['user']['timeout'] * 60 >= time(), 1, 0);
            $userdata[$i]['REALNAME'] = replace($res['realname']);
            $userdata[$i]['GENDER'] = $res['gender'];
            $userdata[$i]['CITY'] = replace($res['city']);
            $userdata[$i]['PLZ'] = replace($res['plz']);
            $userdata[$i]['COUNTRY'] = $res['country'];
            $userdata[$i]['LASTACTIVE'] = $res['lastactive'];
            $userdata[$i]['AVATAR'] = $user->mkavatar($res);
            $userdata[$i]['AVATAR_TITLE'] = $user->mkavtitle($res);
            //Custom-Felder
            for ($ii = 1; $ii <= 10; $ii++) {
                $tabledata[$i]['CUSTOM' . $ii . '_NAME'] = $set['user']['cusfield_names'][$ii - 1];
                $tabledata[$i]['CUSTOM' . $ii] = compatible_hsc($res['custom' . $ii]);
            }
        }
    }
    $tmpl->assign('VISITOR', $userdata);
}
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:30,代码来源:functions.php

示例2: mediamanager_inline

function mediamanager_inline($insert = '', $id = false)
{
    global $set, $db, $apx;
    //Felder, in die eingefügt werden darf
    if (!$insert) {
        echo 'missing fields!';
        return;
    }
    //Umgebungsvariablen
    $module = $apx->module();
    $id = (int) $id;
    $status = (int) $_POST['inline_status'];
    //Hash-Wert ermitteln
    if (!$id && $_POST['inline_hash']) {
        $hash = compatible_hsc($_POST['inline_hash']);
    } elseif (!$id) {
        $hash = compatible_hsc(md5(microtime()));
    }
    //Button-Beschriftungen
    $apx->lang->dropaction('mediamanager', 'inline');
    $lang_open = $apx->lang->get('INLINE_OPEN');
    $lang_close = $apx->lang->get('INLINE_CLOSE');
    //Iframe anzeigen, oder nicht anzeigen...
    if ($status) {
        $hide_button = 'display:none;';
    } else {
        $hide_iframe = 'display:none;';
    }
    echo <<<CODE
<div id="inline_button" style="{$hide_button}"><input type="button" name="inline_open" value="{$lang_open}" onclick="open_inline();" class="button" /></div>
<div id="inline_iframe" style="{$hide_iframe}">
<div style="padding-bottom:3px;"><input type="button" name="inline_open" value="{$lang_close}" onclick="close_inline();" class="button" /></div>
<iframe src="action.php?action=mediamanager.inline&amp;module={$module}&amp;mid={$id}&amp;hash={$hash}&amp;fields={$insert}" width="98%" height="250" name="inline" frameborder="0" style="width:98%;height:250px;">Sorry, your browser does not support frames!</iframe>
</div>
<script language="JavaScript" type="text/javascript">
<!--

//Inlinescreens öffnen
function open_inline() {
\tgetobject('inline_button').style.display='none';
\tgetobject('inline_iframe').style.display='';
\tgetobject('inline_status').value=1;
}

//Inlinescreens schließen
function close_inline() {
\tgetobject('inline_button').style.display='';
\tgetobject('inline_iframe').style.display='none';
\tgetobject('inline_status').value=0;
}

//-->
</script>
<input type="hidden" name="inline_hash" value="{$hash}" />
<input type="hidden" name="inline_status" id="inline_status" value="{$status}" />
CODE;
}
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:57,代码来源:admin_system.php

示例3: createTeamData

function createTeamData($res, $parse)
{
    global $apx, $db, $set, $user;
    $userdata = array();
    if ($res['birthday']) {
        $bd = explode('-', $res['birthday']);
        $birthday = intval($bd[0]) . '. ' . getcalmonth($bd[1]) . iif($bd[2], ' ' . $bd[2]);
        if ($bd[2]) {
            $age = date('Y') - $bd[2];
            if (intval(sprintf('%02d%02d', $bd[1], $bd[0])) > intval(date('md'))) {
                $age -= 1;
            }
        }
    }
    $userdata['ID'] = $res['userid'];
    $userdata['USERID'] = $res['userid'];
    $userdata['NAME'] = replace($res['username']);
    $userdata['USERNAME'] = replace($res['username']);
    $userdata['GROUPID'] = $res['groupid'];
    $userdata['EMAIL'] = replace(iif(!$res['pub_hidemail'], $res['email']));
    $userdata['EMAIL_ENCRYPTED'] = replace(iif(!$res['pub_hidemail'], cryptMail($res['email'])));
    $userdata['ONLINE'] = iif(!$res['pub_invisible'] && $res['lastactive'] + $set['user']['timeout'] * 60 >= time(), 1, 0);
    $userdata['ISONLINE'] = $userdata['ONLINE'];
    $userdata['REALNAME'] = replace($res['realname']);
    $userdata['GENDER'] = $res['gender'];
    $userdata['CITY'] = replace($res['city']);
    $userdata['PLZ'] = replace($res['plz']);
    $userdata['COUNTRY'] = $res['country'];
    $userdata['REGTIME'] = $res['reg_time'];
    $userdata['REGDAYS'] = floor((time() - $res['reg_time']) / (24 * 3600));
    $userdata['LASTACTIVE'] = $res['lastactive'];
    $userdata['AVATAR'] = $user->mkavatar($res);
    $userdata['AVATAR_TITLE'] = $user->mkavtitle($res);
    $userdata['BIRTHDAY'] = $birthday;
    $userdata['AGE'] = $age;
    if (in_array($varname . '.ISBUDDY', $parse)) {
        $userdata['ISBUDDY'] = $user->is_buddy($res['userid']);
    }
    //Custom-Felder
    for ($ii = 1; $ii <= 10; $ii++) {
        $userdata['CUSTOM' . $ii . '_NAME'] = $set['user']['cusfield_names'][$ii - 1];
        $userdata['CUSTOM' . $ii] = compatible_hsc($res['custom' . $ii]);
    }
    //Interaktions-Links
    if ($user->info['userid']) {
        $userdata['LINK_SENDPM'] = mklink('user.php?action=newpm&amp;touser=' . $res['userid'], 'user,newpm,' . $res['userid'] . '.html');
        $userdata['LINK_SENDEMAIL'] = mklink('user.php?action=newmail&amp;touser=' . $res['userid'], 'user,newmail,' . $res['userid'] . '.html');
        if (in_array($varname . '.LINK_BUDDY', $parse) && !$user->is_buddy($res['userid'])) {
            $userdata['LINK_BUDDY'] = mklink('user.php?action=addbuddy&amp;id=' . $res['userid'], 'user,addbuddy,' . $res['userid'] . '.html');
        }
    }
    return $userdata;
}
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:53,代码来源:team.php

示例4: get_subtree

 function get_subtree($dir)
 {
     $dirs = readout_dir($dir);
     $numdirs = count($dirs);
     $dirdata = array();
     $i = 0;
     foreach ($dirs as $dirname) {
         ++$i;
         $dirdata[] = array('NAME' => compatible_hsc($dirname), 'PATH' => iif($dir, $dir . '/') . $dirname, 'LAST' => $i == $numdirs);
     }
     return $dirdata;
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:12,代码来源:explorer.php

示例5: glossar_highlight

function glossar_highlight($text, $module = false, $ignore = false)
{
    global $apx, $db, $set;
    static $highlights;
    $ignore = (int) $ignore;
    if (!$set['glossar']['highlight'] || !$text) {
        return $text;
    }
    $apx->lang->drop('highlights', 'glossar');
    $classname_word = 'glossar_highlight';
    $classname_title = 'glossar_info_title';
    $classname_text = 'glossar_info_text';
    $classname_readmore = 'glossar_info_readmore';
    //Daten auslesen
    if (!isset($highlights)) {
        $highlights = array();
        $data = $db->fetch("SELECT id,title,spelling,text FROM " . PRE . "_glossar WHERE starttime!=0" . iif($ignore, " AND id!='" . $ignore . "'"));
        if (count($data)) {
            foreach ($data as $res) {
                $words = array();
                if ($res['spelling']) {
                    $words = explode(',', strtolower($res['spelling']));
                }
                $words[] = strtolower($res['title']);
                $words = array_unique(array_map('trim', $words));
                $link = mklink('glossar.php?id=' . $res['id'], 'glossar,id' . $res['id'] . urlformat($res['title']) . '.html');
                $content = '<div class="' . $classname_title . '"><a href="' . $link . '">' . $res['title'] . '</a></div><div class="' . $classname_text . '">' . shorttext($res['text'], 200) . '</div><div class="' . $classname_readmore . '"><a href="' . $link . '">' . $apx->lang->get('READMORE') . '</a></div>';
                $content = strtr(compatible_hsc($content), array("\n" => ' ', "\r" => '', '\'' => '\\\'', '\\' => '\\\\'));
                $highlights[] = array('words' => $words, 'content' => $content);
            }
        }
    }
    //Text nach Highlights durchsuchen
    $lowertext = strtolower($text);
    foreach ($highlights as $element) {
        $words = $element['words'];
        foreach ($words as $wkey => $word) {
            if (strpos($lowertext, strtolower($word)) === false) {
                unset($words[$wkey]);
            }
        }
        if (!count($words)) {
            continue;
        }
        $words = array_map('preg_quote', $words);
        $searchfor = implode('|', $words);
        $hover = 'Tip(\'' . $element['content'] . '\')';
        $text = preg_replace('#((<[^>]*)|($|[\\s<>,.:;_!-])(' . $searchfor . ')([\\s<>,.:;_!-]|$))#ie', '"\\2"=="\\1" ? glossar_stripslashes("\\1") : glossar_stripslashes("\\3")."<span class=\\"' . $classname_word . '\\" onmouseover=\\"' . strtr($hover, array('\\' => '\\\\')) . '\\">".glossar_stripslashes("\\4")."</span>".glossar_stripslashes("\\5")', $text);
        //$text=preg_replace('#((<[^>]*)|('.$searchfor.'))#ie', '"\2"=="\1" ? glossar_stripslashes("\1") : "<span class=\"'.$classname_word.'\" onmouseover=\"'.$hover.'\">".glossar_stripslashes("\3")."</span>"', $text);
    }
    return $text;
}
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:52,代码来源:system.php

示例6: misc_comments_report

function misc_comments_report()
{
    global $apx, $db, $set, $user;
    $_REQUEST['id'] = (int) $_REQUEST['id'];
    if (!$_REQUEST['id']) {
        die('missing ContentID!');
    }
    $apx->lang->drop('report', 'comments');
    $apx->tmpl->loaddesign('blank');
    headline($apx->lang->get('HEADLINE_REPORT'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
    titlebar($apx->lang->get('HEADLINE_REPORT'));
    //Absenden
    if ($_POST['send']) {
        //Kommentar auslesen
        list($commenttext) = $db->first("SELECT text FROM " . PRE . "_comments WHERE id='" . $_REQUEST['id'] . "' LIMIT 1");
        if (!$_POST['text']) {
            message('back');
        } elseif (!$commenttext) {
            message('invalid comment-ID!');
        } else {
            //eMail senden
            if ($set['comments']['reportmail']) {
                $input['URL'] = $_POST['url'];
                $input['REASON'] = $_POST['text'];
                $input['TEXT'] = $commenttext;
                sendmail($set['comments']['reportmail'], 'REPORT', $input);
            }
            message($apx->lang->get('MSG_OK'));
        }
    } else {
        $apx->tmpl->assign('POSTTO', HTTPDIR . 'misc.php?action=comments_report');
        $apx->tmpl->assign('URL', compatible_hsc($_REQUEST['url']));
        $apx->tmpl->assign('ID', $_REQUEST['id']);
        $apx->tmpl->parse('report', 'comments');
    }
}
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:36,代码来源:misc.php

示例7: message

        message($apx->lang->get('MSG_MAILNOTVALID'), 'back');
    } else {
        $goto = HTTP . $set['forum']['directory'] . '/' . mkrellink('thread.php?id=' . $threadinfo['threadid'], 'thread,' . $threadinfo['threadid'] . ',1' . urlformat($threadinfo['title']) . '.html');
        mail($_POST['toemail'], $_POST['subject'], $_POST['text'], 'From: ' . $_POST['username'] . '<' . $_POST['email'] . '>');
        message($apx->lang->get('MSG_OK'), $goto);
    }
} else {
    $url = HTTP . $set['forum']['directory'] . '/' . mkrellink('thread.php?id=' . $threadinfo['threadid'], 'thread,' . $threadinfo['threadid'] . ',1' . urlformat($threadinfo['title']) . '.html');
    //Captcha erstellen
    if ($set['main']['tellcaptcha'] && !$user->info['userid']) {
        require BASEDIR . 'lib/class.captcha.php';
        $captcha = new captcha();
        $captchacode = $captcha->generate();
    }
    $apx->tmpl->assign('POSTTO', $_SERVER['REQUEST_URI']);
    $apx->tmpl->assign('TITLE', trim(compatible_hsc(strip_tags(forum_get_prefix($threadinfo['prefix']) . ' ') . $threadinfo['title'])));
    $apx->tmpl->assign('TEXT', compatible_hsc($apx->lang->get('MAIL_TELL_TEXT', array('URL' => $url))));
    $apx->tmpl->assign('CAPTCHA', $captchacode);
    $apx->tmpl->parse('tell');
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
$threadpath = array(array('TITLE' => trim(compatible_hsc(strip_tags(forum_get_prefix($threadinfo['prefix']) . ' ') . $threadinfo['title'])), 'LINK' => mkrellink('thread.php?id=' . $threadinfo['threadid'], 'thread,' . $threadinfo['threadid'] . ',1' . urlformat($threadinfo['title']) . '.html')));
$apx->tmpl->assign('PATH', array_merge(forum_path($foruminfo, 1), $threadpath));
$apx->tmpl->assign('PATHEND', $apx->lang->get('HEADLINE_TELL'));
titlebar($apx->lang->get('HEADLINE_TELL'));
////////////////////////////////////////////////////////////////////////////////////////////////////////
require 'lib/_end.php';
///////////////////////////////////////////////////////////////////////////
require '../lib/_end.php';
//////////////////////////////////////////////////////// SCRIPT BEENDEN ///
////////////////////////////////////////////////////////////////////////////////////////////////////////
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:tell.php

示例8: disable

 function disable()
 {
     global $set, $db, $apx;
     $_REQUEST['id'] = (int) $_REQUEST['id'];
     if (!$_REQUEST['id']) {
         die('missing ID!');
     }
     if ($_POST['send']) {
         if (!checkToken()) {
             printInvalidToken();
         } else {
             $db->query("UPDATE " . PRE . "_poll SET starttime='0',endtime='0' WHERE ( id='" . $_REQUEST['id'] . "' ) LIMIT 1");
             logit('POLL_DISABLE', 'ID #' . $_REQUEST['id']);
             printJSReload();
         }
     } else {
         list($title) = $db->first("SELECT question FROM " . PRE . "_poll WHERE id='" . $_REQUEST['id'] . "' LIMIT 1");
         $apx->tmpl->assign('MESSAGE', $apx->lang->get('MSG_TEXT', array('TITLE' => compatible_hsc($title))));
         tmessageOverlay('disable', array('ID' => $_REQUEST['id']));
     }
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:21,代码来源:admin.php

示例9: group

 function group()
 {
     global $set, $db, $apx, $html;
     $_REQUEST['id'] = (int) $_REQUEST['id'];
     $data = $set['banner']['groups'];
     //Kategorie löschen
     if ($_REQUEST['do'] == 'del' && isset($data[$_REQUEST['id']])) {
         list($count) = $db->first("SELECT count(*) FROM " . PRE . "_banner WHERE " . PRE . "_banner.group='" . $id . "'");
         if (!$count) {
             if (isset($_POST['id'])) {
                 if (!checkToken()) {
                     infoInvalidToken();
                 } else {
                     unset($data[$_REQUEST['id']]);
                     $db->query("UPDATE " . PRE . "_config SET value='" . addslashes(serialize($data)) . "' WHERE module='banner' AND varname='groups' LIMIT 1");
                     logit('BANNER_CATDEL', $_REQUEST['id']);
                     printJSReload();
                 }
             } else {
                 $apx->tmpl->assign('MESSAGE', $apx->lang->get('MSG_TEXT', array('TITLE' => compatible_hsc($data[$_REQUEST['id']]))));
                 tmessageOverlay('catdel', array('ID' => $_REQUEST['id']));
             }
             return;
         }
     } elseif ($_REQUEST['do'] == 'edit' && isset($data[$_REQUEST['id']])) {
         if (isset($_POST['title'])) {
             if (!checkToken()) {
                 infoInvalidToken();
             } elseif (!$_POST['title']) {
                 infoNotComplete();
             } else {
                 $data[$_REQUEST['id']] = $_POST['title'];
                 $db->query("UPDATE " . PRE . "_config SET value='" . addslashes(serialize($data)) . "' WHERE module='banner' AND varname='groups' LIMIT 1");
                 logit('BANNER_CATEDIT', $_REQUEST['id']);
                 printJSRedirect('action.php?action=banner.group');
                 return;
             }
         } else {
             $_POST['title'] = $data[$_REQUEST['id']];
             $apx->tmpl->assign('TITLE', $_POST['title']);
             $apx->tmpl->assign('ACTION', 'edit');
             $apx->tmpl->assign('ID', $_REQUEST['id']);
             $apx->tmpl->parse('catadd_catedit');
         }
     } elseif ($_REQUEST['do'] == 'add') {
         if ($_POST['send']) {
             if (!checkToken()) {
                 printInvalidToken();
             } elseif (!$_POST['title']) {
                 infoNotComplete();
             } else {
                 if (!count($data)) {
                     $data[1] = $_POST['title'];
                 } else {
                     $data[] = $_POST['title'];
                 }
                 $db->query("UPDATE " . PRE . "_config SET value='" . addslashes(serialize($data)) . "' WHERE module='banner' AND varname='groups' LIMIT 1");
                 logit('BANNER_CATADD', array_key_max($data));
                 printJSRedirect('action.php?action=banner.group');
                 return;
             }
         }
     } else {
         $apx->tmpl->assign('ACTION', 'add');
         $apx->tmpl->parse('catadd_catedit');
     }
     $col[] = array('ID', 1, 'align="center"');
     $col[] = array('COL_TITLE', 80, 'class="title"');
     $col[] = array('COL_BANNERS', 20, 'align="center"');
     //AUSGABE
     asort($data);
     foreach ($data as $id => $res) {
         ++$i;
         list($count) = $db->first("SELECT count(*) FROM " . PRE . "_banner WHERE " . PRE . "_banner.group='" . $id . "'");
         $tabledata[$i]['COL1'] = $id;
         $tabledata[$i]['COL2'] = $res;
         $tabledata[$i]['COL3'] = $count;
         $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'banner.group', 'do=edit&id=' . $id, $apx->lang->get('CORE_EDIT'));
         if (!$count) {
             $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'banner.group', 'do=del&id=' . $id, $apx->lang->get('CORE_DEL'));
         } else {
             $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />';
         }
     }
     $apx->tmpl->assign('TABLE', $tabledata);
     $html->table($col);
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:87,代码来源:admin.php

示例10: calendar_print

function calendar_print($data, $template)
{
    global $set, $db, $apx, $user;
    $tmpl = new tengine();
    $parse = $tmpl->used_vars($template, 'calendar');
    //Kategorie-Info
    $catids = get_ids($data, 'catid');
    $catdata = array();
    if (count($catids)) {
        $catdata = $db->fetch_index("SELECT * FROM " . PRE . "_calendar_cat WHERE id IN (" . implode(',', $catids) . ")", 'id');
    }
    //Termine auflisten
    if (count($data)) {
        foreach ($data as $res) {
            ++$i;
            $event = array();
            //Kategorie-Info
            $catinfo = $catdata[$res['catid']];
            //Link zum Termin
            $link = mklink('events.php?id=' . $res['id'], 'events,id' . $res['id'] . urlformat($res['title']) . '.html');
            //Aufmacher
            $picture = $picture_popup = '';
            if (in_template(array('EVENT.PICTURE', 'EVENT.PICTURE_POPUP', 'EVENT.PICTURE_POPUPPATH'), $parse)) {
                list($picture, $picture_popup, $picture_popuppath) = calendar_pic($res['picture']);
            }
            //Start berechnen
            $startday = $starttime = $endday = $endtime = 0;
            if (in_template(array('EVENT.STARTDAY', 'EVENT.STARTTIME'), $parse)) {
                $startday = calendar_stamp2time($res['startday']);
                if ($res['starttime'] != -1) {
                    $time_comp = calendar_explode_stamp($res['startday']);
                    $tmpstamp = sprintf('%04d', $res['starttime']);
                    $time_comp['hour'] = substr($tmpstamp, 0, 2);
                    $time_comp['minute'] = substr($tmpstamp, 2, 2);
                    $starttime = mktime($time_comp['hour'], $time_comp['minute'], 0, $time_comp['month'], $time_comp['day'], $time_comp['year']) + TIMEDIFF;
                }
            }
            //Ende berechnen (falls nötig)
            if (in_template(array('EVENT.ENDDAY', 'EVENT.ENDTIME'), $parse)) {
                if ($res['endday'] != $res['startday'] || $res['endtime'] != -1) {
                    $endday = calendar_stamp2time($res['endday']);
                    if ($res['endtime'] != -1) {
                        $time_comp = calendar_explode_stamp($res['endday']);
                        $tmpstamp = sprintf('%04d', $res['endtime']);
                        $time_comp['hour'] = substr($tmpstamp, 0, 2);
                        $time_comp['minute'] = substr($tmpstamp, 2, 2);
                        $endtime = mktime($time_comp['hour'], $time_comp['minute'], 0, $time_comp['month'], $time_comp['day'], $time_comp['year']) + TIMEDIFF;
                    }
                }
            }
            //Username + eMail
            if ($res['userid']) {
                $username = $res['username'];
                $email = iif(!$res['pub_hidemail'], $res['email']);
            } else {
                $username = $res['send_username'];
                $email = $res['send_email'];
            }
            //Text
            $eventtext = '';
            if (in_array('EVENT.TEXT', $parse)) {
                $eventtext = mediamanager_inline($res['text']);
                if ($apx->is_module('glossar')) {
                    $eventtext = glossar_highlight($eventtext);
                }
            }
            //Datehead
            if ($laststamp != $res['startday']) {
                $event['DATEHEAD'] = $startday;
            }
            //Tags
            if (in_array('EVENT.TAG', $parse) || in_array('EVENT.TAG_IDS', $parse) || in_array('EVENT.KEYWORDS', $parse)) {
                list($tagdata, $tagids, $keywords) = calendar_tags($res['id']);
            }
            $event['ID'] = $res['id'];
            $event['TITLE'] = $res['title'];
            $event['TEXT'] = $eventtext;
            $event['LINK'] = $link;
            $event['LOCATION'] = compatible_hsc($res['location']);
            $event['LOCATION_LINK'] = compatible_hsc($res['location_link']);
            $event['PRIORITY'] = $res['priority'];
            $event['RESTRICTED'] = $res['restricted'];
            $event['PRIVATE'] = $res['private'];
            $event['HITS'] = $res['hits'];
            $event['RELATED'] = calendar_links($res['links']);
            $event['PICTURE'] = $picture;
            $event['PICTURE_POPUP'] = $picture_popup;
            $event['PICTURE_POPUPPATH'] = $picture_popuppath;
            $event['STARTDAY'] = $startday;
            $event['STARTTIME'] = $starttime;
            $event['ENDDAY'] = $endday;
            $event['ENDTIME'] = $endtime;
            $event['USERID'] = $res['userid'];
            $event['USERNAME'] = replace($username);
            $event['EMAIL'] = replace($email);
            $event['EMAIL_ENCRYPTED'] = replace(cryptMail($email));
            $event['CATID'] = $res['catid'];
            $event['CATTITLE'] = $catinfo['title'];
            $event['CATICON'] = $catinfo['icon'];
            //Tags
//.........这里部分代码省略.........
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:101,代码来源:tfunctions.php

示例11: compatible_hsc

                $tabledata[$i]['CUSTOM' . $ii . '_NAME'] = $set['user']['cusfield_names'][$ii - 1];
                $tabledata[$i]['CUSTOM' . $ii] = compatible_hsc($res['custom' . $ii]);
            }
            //Forumbeiträge
            if ($apx->is_module('forum')) {
                $tabledata[$i]['FORUMPOSTS'] = $res['forum_posts'];
            }
            $tabledata[$i]['LINK_BUDDY'] = iif($user->info['userid'] && !$user->is_buddy($res['userid']), mklink('user.php?action=addbuddy&amp;id=' . $res['userid'], 'user,addbuddy,' . $res['userid'] . '.html'));
            $tabledata[$i]['LINK_SENDPM'] = iif($user->info['userid'], mklink('user.php?action=newpm&amp;touser=' . $res['userid'], 'user,newpm,' . $res['userid'] . '.html'));
            $tabledata[$i]['LINK_SENDEMAIL'] = iif($user->info['userid'] || $set['user']['sendmail_guests'], mklink('user.php?action=newmail&amp;touser=' . $res['userid'], 'user,newmail,' . $res['userid'] . '.html'));
        }
    }
    //Sortieren nach...
    ordervars($orderdef, mklink('user.php?action=search&amp;searchid=' . $_REQUEST['searchid'], 'user,search.html?searchid=' . $_REQUEST['searchid']));
    $apx->tmpl->assign('USER', $tabledata);
} else {
    $_POST['gender'] = 0;
    $_POST['distance'] = 25;
}
//Formular erzeugen
$apx->tmpl->assign('ITEM', compatible_hsc($_POST['item']));
$apx->tmpl->assign('AGE_MIN', intval($_POST['age_min']));
$apx->tmpl->assign('AGE_MAX', intval($_POST['age_max']));
$apx->tmpl->assign('GENDER', intval($_POST['gender']));
$apx->tmpl->assign('CITY', compatible_hsc($_POST['city']));
$apx->tmpl->assign('PLZ', compatible_hsc($_POST['plz']));
$apx->tmpl->assign('DISTANCE', intval($_POST['distance']));
$apx->tmpl->assign('ONLINE', intval($_POST['online']));
$postto = mklink('user.php?action=search', 'user,search.html');
$apx->tmpl->assign('POSTTO', $postto);
$apx->tmpl->parse('search');
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:search.php

示例12: elseif

    } elseif ($user->info['userid'] && $touser == $user->info['userid']) {
        message($apx->lang->get('MSG_SELF'), 'javascript:history.back()');
    } else {
        if ($user->info['userid']) {
            $sender = $user->info['username'] . '<' . $user->info['email'] . '>';
        } else {
            $sender = $_POST['name'] . '<' . $_POST['email'] . '>';
        }
        mail($email, $_POST['subject'], $_POST['text'], 'From: ' . $sender);
        if ($user->info['userid']) {
            message($apx->lang->get('MSG_OK'), mklink('user.php', 'user.html'));
        } else {
            message($apx->lang->get('MSG_OK'), mklink('index.php', 'index.html'));
        }
    }
} else {
    if ($_REQUEST['touser']) {
        list($username) = $db->first("SELECT username FROM " . PRE . "_user WHERE userid='" . intval($_REQUEST['touser']) . "' LIMIT 1");
        $apx->tmpl->assign('USERNAME', compatible_hsc($username));
    }
    $postto = mklink('user.php?action=newmail', 'user,newmail.html');
    //Captcha erstellen
    if (!$user->info['userid']) {
        require BASEDIR . 'lib/class.captcha.php';
        $captcha = new captcha();
        $captchacode = $captcha->generate();
    }
    $apx->tmpl->assign('CAPTCHA', $captchacode);
    $apx->tmpl->assign('POSTTO', $postto);
    $apx->tmpl->parse('newmail');
}
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:newmail.php

示例13: array_diff

            $inlist[] = $res['postid'];
        }
    }
    //Alle IDs, die nicht aufgelistet wurden
    $notinlist = array_diff($_POST['post'], $inlist);
    foreach ($notinlist as $id) {
        $seldata[]['ID'] = $id;
    }
    $apx->tmpl->assign('FORUM', $forumdata);
    $apx->tmpl->assign('POST', $postdata);
    $apx->tmpl->assign('SELPOST', $seldata);
    $apx->tmpl->assign('TITLE', compatible_hsc($_POST['title']));
    $apx->tmpl->assign('ICON', $_POST['icon']);
    $apx->tmpl->assign('ICONLIST', $icondata);
    $apx->tmpl->assign('STICKY_TYPE', compatible_hsc($_POST['sticky_type']));
    $apx->tmpl->assign('STICKY_TEXT', compatible_hsc($_POST['sticky_text']));
    $apx->tmpl->assign('ANNOUNCE', forum_access_announce($foruminfo));
    $apx->tmpl->assign('ID', $threadinfo['threadid']);
    $apx->tmpl->assign('P', $_REQUEST['p']);
    $apx->tmpl->assign('PREVIOUS', iif($_REQUEST['p'] > 1, 1, 0));
    $apx->tmpl->assign('NEXT', iif($_REQUEST['p'] < $pages, 1, 0));
    $apx->tmpl->parse('split');
    ////////////////////////////////////////////
    $threadpath = array(array('TITLE' => replace($threadinfo['title']), 'LINK' => mkrellink('thread.php?id=' . $threadinfo['threadid'], 'thread,' . $threadinfo['threadid'] . ',1' . urlformat($threadinfo['title']) . '.html')));
    $apx->tmpl->assign('PATH', array_merge(forum_path($foruminfo, 1), $threadpath));
    $apx->tmpl->assign('PATHEND', $apx->lang->get('SPLITTHREAD'));
    titlebar($apx->lang->get('SPLITTHREAD'));
} elseif ($_REQUEST['action'] == 'ipstats') {
    $apx->lang->drop('ipstats');
    $_REQUEST['id'] = (int) $_REQUEST['id'];
    if (!$_REQUEST['id']) {
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:admin.php

示例14: cfg

 function cfg()
 {
     global $set, $db, $apx;
     if ($_POST['send'] == 1) {
         $invalid = array();
         if ($_POST['ffmpeg'] && !$this->validateExecPath('ffmpeg', $_POST['ffmpeg'])) {
             $invalid[] = 'FFmpeg';
         }
         if ($_POST['flvtool2'] && !$this->validateExecPath('flvtool2', $_POST['flvtool2'])) {
             $invalid[] = 'FLVTool2';
         }
         if ($_POST['mencoder'] && !$this->validateExecPath('mencoder', $_POST['mencoder'])) {
             $invalid[] = 'MEncoder';
         }
         if (!$_POST['ffmpeg'] || !$_POST['flvtool2']) {
             info($apx->lang->get('CORE_BACK'));
         } elseif ($invalid) {
             info($apx->lang->get('INFO_INVALID') . implode(', ', $invalid));
         } else {
             $db->query("UPDATE " . PRE . "_config SET value='" . addslashes($_POST['ffmpeg']) . "' WHERE module='videos' AND varname='ffmpeg' LIMIT 1");
             $db->query("UPDATE " . PRE . "_config SET value='" . addslashes($_POST['flvtool2']) . "' WHERE module='videos' AND varname='flvtool2' LIMIT 1");
             $db->query("UPDATE " . PRE . "_config SET value='" . addslashes($_POST['mencoder']) . "' WHERE module='videos' AND varname='mencoder' LIMIT 1");
             logit('VIDEOS_CFG');
             printJSRedirect('action.php?action=videos.cfg');
         }
     } else {
         if (!function_exists('exec')) {
             message($apx->lang->get('MSG_EXEC_DISABLED'));
             return;
         }
         $apx->tmpl->assign('FFMPEG', compatible_hsc($set['videos']['ffmpeg']));
         $apx->tmpl->assign('FLVTOOL2', compatible_hsc($set['videos']['flvtool2']));
         $apx->tmpl->assign('MENCODER', compatible_hsc($set['videos']['mencoder']));
         $apx->tmpl->parse('cfg');
     }
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:36,代码来源:admin.php

示例15: compatible_hsc

        $apx->tmpl->assign('PREVIEW', $text);
        $apx->tmpl->assign('USERNAME', compatible_hsc($_POST['touser']));
        $apx->tmpl->assign('SUBJECT', compatible_hsc($_POST['subject']));
        $apx->tmpl->assign('TEXT', compatible_hsc($_POST['text']));
        $apx->tmpl->assign('ADDSIG', intval($_POST['addsig']));
    } else {
        $text = '';
        if ($_REQUEST['answer']) {
            $res = $db->first("SELECT a.subject,a.text,b.userid,b.username,c.username AS username2 FROM " . PRE . "_user_pms AS a LEFT JOIN " . PRE . "_user AS b ON a.fromuser=b.userid LEFT JOIN " . PRE . "_user AS c ON a.touser=c.userid WHERE ( a.id='" . $_REQUEST['answer'] . "' AND ( a.touser='" . $user->info['userid'] . "' OR a.fromuser='" . $user->info['userid'] . "' ) )");
            if ($res['userid'] == $user->info['userid']) {
                $username = compatible_hsc($res['username2']);
                $subject = compatible_hsc($res['subject']);
                $text = '[QUOTE]' . compatible_hsc($res['text']) . "[/QUOTE]\n";
            } else {
                $username = compatible_hsc($res['username']);
                $subject = iif($res['subject'] && substr($res['subject'], 0, 4) != 'Re: ', 'Re: ') . compatible_hsc($res['subject']);
                $text = '[QUOTE]' . compatible_hsc($res['text']) . "[/QUOTE]\n";
            }
        } elseif ($_REQUEST['touser']) {
            list($username) = $db->first("SELECT username FROM " . PRE . "_user WHERE userid='" . $_REQUEST['touser'] . "' LIMIT 1");
            $username = compatible_hsc($username);
        }
        $apx->tmpl->assign('USERNAME', replace($username));
        $apx->tmpl->assign('SUBJECT', $subject);
        $apx->tmpl->assign('TEXT', $text);
        $apx->tmpl->assign('ADDSIG', 1);
    }
    $postto = mklink('user.php?action=newpm', 'user,newpm.html');
    $apx->tmpl->assign('POSTTO', $postto);
    $apx->tmpl->parse('newpm');
}
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:newpm.php


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