function addcommentary()
{
    global $session, $emptypost, $afk, $dni;
    $section = httppost('section');
    $talkline = httppost('talkline');
    $schema = httppost('schema');
    $comment = trim(httppost('insertcommentary'));
    $counter = httppost('counter');
    $remove = URLDecode(httpget('removecomment'));
    $restore = URLDecode(httpget('restorecomment'));
    //debug(httpallpost());
    if (httpget("bulkdelete")) {
        $everything = httpallpost();
        foreach ($everything as $key => $val) {
            if (substr($key, 0, 14) == "deletecomment_") {
                $del = str_replace("deletecomment_", "", $key);
                removecommentary($del, "Mass deletion by " . $session['user']['name'], $session['user']['acctid']);
            }
        }
    }
    if (!$comment) {
        return false;
    }
    if ($session['user']['chatloc'] == "DNI") {
        $dni = true;
    }
    if ($comment == strtoupper($comment)) {
        //this is an all-uppercase entry.  Do not add this comment to the database; instead, check it for built-in stuff like AFK and GREM, then run it through the commentarycommand hook
        if ($comment == "AFK" || $comment == "BRB") {
            $session['user']['chatloc'] = "AFK";
            $afk = true;
            output("`0`n`c`bYou are Away From the Keyboard until you load another page.`b`c`n");
            return false;
        }
        if ($comment == "DNI") {
            if ($session['user']['chatloc'] == "DNI") {
                $session['user']['chatloc'] = $section;
                $dni = false;
                output("`0`n`c`bYou are no longer in Do Not Interrupt status.`b`c`n");
            } else {
                $session['user']['chatloc'] = "DNI";
                $dni = true;
                output("`0`n`c`bYou are in Do Not Interrupt status.  Type DNI again to leave.`b`nDNI status is used for whenever you're doing or saying something that means other players shouldn't try to interact with you.  For example, when two or more characters are chatting just outside of the main group of characters, and other characters shouldn't be able to hear them.`c`n");
            }
            return false;
        }
        if ($comment == "GREM") {
            //handle deleting the player's last comment
            $sql = "SELECT * FROM " . db_prefix("commentary") . " WHERE author='" . $session['user']['acctid'] . "' ORDER BY commentid DESC LIMIT 1";
            $result = db_query($sql);
            while ($row = db_fetch_assoc($result)) {
                $now = time();
                $then = strtotime($row['postdate']);
                $ago = $now - $then;
                if ($ago < 120) {
                    removecommentary($row['commentid'], "Typo Gremlin", $session['user']['acctid']);
                    output("`0`n`c`bA nearby Typo Gremlin notices the peculiar tastiness of your previous comment.  Within moments, a small horde of them have descended upon your words, and consumed them.`b`c`n");
                } else {
                    output("`0`n`c`bThe Typo Gremlins turn up their nose at your latest comment - it's just too old.  They have no taste for stale words.`b`c`n");
                }
            }
            return false;
        }
        $hookcommand = array('command' => $comment, 'section' => $section);
        $returnedhook = modulehook("commentarycommand", $hookcommand);
        if (!$returnedhook['processed']) {
            debug($returnedhook);
            output("`c`b`JCommand Not Recognized`b`0`nWhen you type in ALL CAPS, the game doesn't think you're talking to other players; it thinks you're trying to perform an action within the game.  For example, typing `#GREM`0 will remove the last comment you posted, as long as you posted it less than two minutes ago.  Typing `#AFK`0 or `#BRB`0 will turn your online status bar grey, so that people know you're `#A`0way `#F`0rom the `#K`0eyboard (or, if you prefer, that you'll `#B`0e `#R`0ight `#B`0ack).  Typing `#DNI`0 will let other players know that you're busy talking to one particular player - maybe somewhere off-camera - and that you don't want to be interrupted right now.`nSome areas have special hidden commands or other easter eggs that you can hunt for.  This time around, you didn't trigger anything special.`c`0`n");
        }
        return false;
    }
    if ($remove > 0) {
        removecommentary($remove, "Moderated by " . $session['user']['name'], $session['user']['acctid']);
    }
    if ($restore > 0) {
        restorecommentary($restore, "Restored by " . $session['user']['name'], $session['user']['acctid']);
    }
    if (array_key_exists('commentcounter', $session) && $session['commentcounter'] == $counter) {
        if ($section || $talkline || $comment) {
            $tcom = color_sanitize($comment);
            if ($tcom == "" || $tcom == ":" || $tcom == "::" || $tcom == "/me") {
                $emptypost = 1;
            } else {
                injectcommentary($section, $talkline, $comment);
            }
        }
    }
}
function addcommentary()
{
    global $session, $emptypost;
    $info = httpallpost();
    unset($info['section']);
    unset($info['talkline']);
    unset($info['schema']);
    unset($info['insertcommentary']);
    unset($info['counter']);
    unset($info['removecomment']);
    $section = httppost('section');
    $talkline = httppost('talkline');
    $schema = httppost('schema');
    $comment = trim(httppost('insertcommentary'));
    $counter = httppost('counter');
    $remove = URLDecode(httpget('removecomment'));
    if ($remove > 0) {
        $return = '/' . httpget('returnpath');
        $section = httpget('section');
        $sql = "SELECT " . db_prefix("commentary") . ".*," . db_prefix("accounts") . ".name," . db_prefix("accounts") . ".acctid, " . db_prefix("accounts") . ".clanrank," . db_prefix("clans") . ".clanshort FROM " . db_prefix("commentary") . " INNER JOIN " . db_prefix("accounts") . " ON " . db_prefix("accounts") . ".acctid = " . db_prefix("commentary") . ".author LEFT JOIN " . db_prefix("clans") . " ON " . db_prefix("clans") . ".clanid=" . db_prefix("accounts") . ".clanid WHERE commentid={$remove}";
        $row = db_fetch_assoc(db_query($sql));
        $sql = "INSERT LOW_PRIORITY INTO " . db_prefix("moderatedcomments") . " (moderator,moddate,comment) VALUES ('{$session['user']['acctid']}','" . date("Y-m-d H:i:s") . "','" . addslashes(serialize($row)) . "')";
        db_query($sql);
        $sql = "DELETE FROM " . db_prefix("commentary") . " WHERE commentid='{$remove}';";
        db_query($sql);
        invalidatedatacache("comments-{$section}");
        // *** DRAGONBG.COM CORE PATCH START ***
        invalidatedatacache("comments-");
        // *** DRAGONBG.COM CORE PATCH END ***
        $session['user']['specialinc'] == '';
        //just to make sure he was not in a special
        $return = cmd_sanitize($return);
        $return = substr($return, strrpos($return, "/") + 1);
        if (strpos($return, "?") === false && strpos($return, "&") !== false) {
            $x = strpos($return, "&");
            $return = substr($return, 0, $x - 1) . "?" . substr($return, $x + 1);
        }
        debug($return);
        redirect($return);
    }
    if (array_key_exists('commentcounter', $session) && $session['commentcounter'] == $counter) {
        if ($section || $talkline || $comment) {
            $tcom = color_sanitize($comment);
            if ($tcom == "" || $tcom == ":" || $tcom == "::" || $tcom == "/me") {
                $emptypost = 1;
            } else {
                injectcommentary($section, $talkline, $comment, $schema);
            }
        }
    }
}
Exemplo n.º 3
0
                $sourceurl = "reports.php";
                $sourcename = "hlášení";
                break;
            default:
                $sourceurl = "";
                $sourcename = "";
                break;
        }
        sparklets('<a href="./' . $sourceurl . '">' . $sourcename . '</a> &raquo; <strong>úprava poznámky</strong> &raquo; <strong>uložení změn</strong>');
        echo '<div id="obsah"><p>Chyba při ukládání změn, ujistěte se, že jste vše provedli správně a máte potřebná práva.</p></div>';
        pageEnd();
    }
}
// nová poznámka
if (isset($_POST['setnote'])) {
    if (!preg_match('/^[[:blank:]]*$/i', $_POST['note']) && !preg_match('/^[[:blank:]]*$/i', $_POST['title']) && is_numeric($_POST['secret'])) {
        auditTrail($_POST['tableid'], 7, $_POST['itemid']);
        MySQL_Query("INSERT INTO " . DB_PREFIX . "notes VALUES('','" . mysql_real_escape_string($_POST['note']) . "','" . mysql_real_escape_string($_POST['title']) . "','" . Time() . "','" . $usrinfo['id'] . "','" . $_POST['tableid'] . "','" . $_POST['itemid'] . "','" . $_POST['secret'] . "','0')");
        //		echo '<div id="obsah"><p>Poznámka upravena.</p></div>';
        if (!isset($_POST['nnotnew'])) {
            unreadRecords($_POST['tableid'], $_POST['itemid']);
        }
    }
    Header('Location: ' . $_POST['backurl']);
}
// vymazání poznámky
if (isset($_GET['deletenote'])) {
    MySQl_Query("UPDATE " . DB_PREFIX . "notes SET deleted=1 WHERE " . DB_PREFIX . "notes.id=" . $_GET['deletenote']);
    //	echo '<div id="obsah"><p>Poznámka smazána.</p></div>';
    Header('Location: ' . URLDecode($_GET['backurl']));
}
Exemplo n.º 4
0
</div>
<div class="container" >
  <div class="row row-padding-xs-100 " style="margin-top:30px;">
    <div class="col-xs-12 gal  row_padding-xs" style="border-bottom:1px solid #D3D3D3; padding-bottom:5px; padding-left:0px;">
      <span style="font-size:25px; font-weight:500;">Order</span>
    </div>
  </div>
  <div class="row row-padding-xs-100 " style="margin:30px 0px; text-align:center;  display:block;">
    <span class="title1">주문이 정상적으로 완료되었습니다</span>
  </div>
</div>
<div class="container-fluid" style="background:#F5F6F7; padding:40px 0px; text-align:center;  display:block;">
  <p class="title2">주문번호: <?php 
echo $codeNum[1];
?>
</p>
  <p class="title2">입금계좌: <?php 
echo URLDecode($bank[1]);
?>
 <?php 
echo $account[1];
?>
</p>
</div>
<div class="container" >
  <div class="row row-padding-xs-100 " style="margin-top:30px; text-align:center;  display:block;">
    <span class="title2" >주문 내역 확인은 마이블랭킷-주문배송조회에서 가능합니다.<br>
입금확인 시점 기준으로 펀딩 결과에 반영이 됩니다.</span>
  </div>
</div>
Exemplo n.º 5
0
 private function _buildQuery()
 {
     //Has to be a string
     $input = JFactory::getApplication()->input;
     $tag = $input->get('tag', null, 'string');
     //Tag is in front, this should remove ?start= or ?limitstart=
     $tags = explode('?', $tag);
     $tag = $tags[0];
     $tag = URLDecode($tag);
     //filter the tag
     $cedTagsHelper = new CedTagsHelper();
     $tag = $cedTagsHelper->unUrlTagname($tag);
     $tag = CedTagsHelper::preHandle($tag);
     JFactory::getApplication()->input->set('tag', $tag);
     $tag = trim($tag);
     $tagObj = null;
     $ids = $this->_ids;
     if (!isset($this->_tagDescription)) {
         $tagObj = $this->getTagByTagName($tag);
         if (isset($tagObj) && $tagObj->id) {
             $this->_termExist = true;
         } else {
             $this->_termExist = false;
             return '';
         }
         $this->_tagDescription = $tagObj->description;
         $this->incrementHitsForTagId($tagObj->id);
         $this->_total = $this->countNumberOfArticleForTagId($tagObj->id);
         $contentIds = $this->getArticlesCidForTag($tagObj->id);
         $ids = implode(',', $contentIds);
         $this->_ids = $ids;
     }
     $this->setTermArticles(!empty($ids));
     $dbo = JFactory::getDBO();
     $query = $dbo->getQuery(true);
     $query->select('a.id');
     $query->select('a.title');
     $query->select('a.created');
     $query->select('a.alias');
     $query->select('a.modified');
     $query->select('a.images');
     $query->select('a.created_by as contactid');
     $query->select('u.name as author');
     $query->select('a.created_by_alias as created_by_alias');
     $query->select('COUNT(a.id) as total');
     $query->select('a.introtext');
     $query->select('a.fulltext');
     $query->select('a.access');
     $query->select('a.state');
     $query->select('a.publish_up');
     $query->select('a.hits');
     $query->select('a.parentid as parent_id');
     $query->select('a.catid as catid');
     $query->select('cc.title as category_title');
     $query->select('cc.title as section');
     $query->select('cc.alias as parent_alias');
     $query->select('CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug');
     $query->select('CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug');
     $query->select('CHAR_LENGTH( a.`fulltext` ) AS readmore');
     $query->from('#__content AS a');
     $query->innerJoin('#__categories AS cc ON cc.id = a.catid');
     $query->innerJoin('#__users AS u ON u.id=a.created_by');
     $query->where('a.id in (' . $ids . ')');
     $query->where(sprintf('(%s)', implode(' AND ', $this->getAccessWhere(false))));
     $query->where('cc.published = ' . $dbo->quote(1));
     $query->group('(a.id)');
     $query->order($this->_buildOrderBy());
     // TODO
     //$this->setState('filter.language', $app->getLanguageFilter());
     CedTagLog::debug("tag.php::_buildQuery " . $query->dump());
     return $query;
 }
function addcommentary()
{
    global $session, $emptypost, $afk, $dni;
    $section = httppost('section');
    $talkline = httppost('talkline');
    $schema = httppost('schema');
    $comment = trim(httppost('insertcommentary'));
    $counter = httppost('counter');
    $remove = URLDecode(httpget('removecomment'));
    $restore = URLDecode(httpget('restorecomment'));
    //debug(httpallpost());
    if (httpget("bulkdelete")) {
        $everything = httpallpost();
        foreach ($everything as $key => $val) {
            if (substr($key, 0, 14) == "deletecomment_") {
                $del = str_replace("deletecomment_", "", $key);
                removecommentary($del, "Mass deletion by " . $session['user']['name'], $session['user']['acctid']);
            }
        }
    }
    if ($remove > 0) {
        removecommentary($remove, "Moderated by " . $session['user']['name'], $session['user']['acctid']);
    }
    if ($restore > 0) {
        restorecommentary($restore, "Restored by " . $session['user']['name'], $session['user']['acctid']);
    }
    if (!$comment) {
        return false;
    }
    if ($session['user']['chatloc'] == "DNI") {
        $dni = true;
    }
    $colors = array("1" => "colDkBlue", "2" => "colDkGreen", "3" => "colDkCyan", "4" => "colDkRed", "5" => "colDkMagenta", "6" => "colDkYellow", "7" => "colDkWhite", "~" => "colBlack", "!" => "colLtBlue", "@" => "colLtGreen", "#" => "colLtCyan", "\$" => "colLtRed", "%" => "colLtMagenta", "^" => "colLtYellow", "&" => "colLtWhite", ")" => "colLtBlack", "e" => "colDkRust", "E" => "colLtRust", "g" => "colXLtGreen", "G" => "colXLtGreen", "j" => "colMdGrey", "k" => "colaquamarine", "K" => "coldarkseagreen", "l" => "colDkLinkBlue", "L" => "colLtLinkBlue", "m" => "colwheat", "M" => "coltan", "p" => "collightsalmon", "P" => "colsalmon", "q" => "colDkOrange", "Q" => "colLtOrange", "R" => "colRose", "T" => "colDkBrown", "t" => "colLtBrown", "V" => "colBlueViolet", "v" => "coliceviolet", "x" => "colburlywood", "X" => "colbeige", "y" => "colkhaki", "Y" => "coldarkkhaki");
    if (substr($comment, 0, 9) == "/chatcol ") {
        $ucol = substr($comment, 9, 1);
        if (!isset($colors[$ucol])) {
            output("`c`b`4Invalid default talk colour`b`nYou entered an invalid colour code, please try again.`0`c`n");
            return false;
        } else {
            $session['user']['prefs']['ucol'] = $ucol;
            output_notl("`c`bDefault talk colour changed`b`n`" . $ucol . "This is your new default commentary dialogue colour.  When you type in commentary areas, this colour will show up automatically.  If you're an Extra-Awesome Site Supporter, you can also change the colour of your character's dialogue during quests, monster fights and other in-game areas using the /talkcol switch, in the same way you just used the /chatcol switch.`0`c`n");
            return false;
        }
    } else {
        if (substr($comment, 0, 9) == "/talkcol ") {
            $ucol = substr($comment, 9, 1);
            if (!isset($colors[$ucol])) {
                output("`c`b`4Invalid default talk colour`b`nYou entered an invalid colour code, please try again.`0`c`n");
                return false;
            } else {
                $session['user']['prefs']['ugcol'] = $ucol;
                if ($session['user']['donation'] >= 2000) {
                    output_notl("`c`bDefault talk colour changed`b`n`" . $ucol . "This is your new default in-game dialogue colour.  This is the colour we'll use to represent your character's dialogue during quests, monster encounters, and other in-game things.  If you choose a colour commonly used by monsters or other characters, you might have problems figuring out who's talking - if that's the case, you can reset to the default with \"/talkcol #\".  You can also change your default colour for commentary areas by using the /chatcol switch, in the same way you just used /talkcol.`0`c`n");
                } else {
                    output("`c`bNot enough Supporter Points`b`nSorry, but due to the extra system load that the /talkcol switch uses, this feature is restricted to players with more than 2,000 Supporter Points.`0`c`n");
                }
                return false;
            }
        }
    }
    if ($comment == strtoupper($comment)) {
        //this is an all-uppercase entry.  Do not add this comment to the database; instead, check it for built-in stuff like AFK and GREM, then run it through the commentarycommand hook
        if ($comment == "AFK" || $comment == "BRB") {
            $session['user']['chatloc'] = "AFK";
            $afk = true;
            output("`0`n`c`bYou are Away From the Keyboard until you load another page.`b`c`n");
            return false;
        }
        if ($comment == "DNI") {
            if ($session['user']['chatloc'] == "DNI") {
                $session['user']['chatloc'] = $section;
                $dni = false;
                output("`0`n`c`bYou are no longer in Do Not Interrupt status.`b`c`n");
            } else {
                $session['user']['chatloc'] = "DNI";
                $dni = true;
                output("`0`n`c`bYou are in Do Not Interrupt status.  Type DNI again to leave.`b`nDNI status is used for whenever you're doing or saying something that means other players shouldn't try to interact with you.  For example, when two or more characters are chatting just outside of the main group of characters, and other characters shouldn't be able to hear them.`c`n");
            }
            return false;
        }
        if ($comment == "GREM") {
            //handle deleting the player's last comment
            $sql = "SELECT * FROM " . db_prefix("commentary") . " WHERE author='" . $session['user']['acctid'] . "' ORDER BY commentid DESC LIMIT 1";
            $result = db_query($sql);
            while ($row = db_fetch_assoc($result)) {
                $now = time();
                $then = strtotime($row['postdate']);
                $ago = $now - $then;
                if ($ago < 120) {
                    removecommentary($row['commentid'], "Typo Gremlin", $session['user']['acctid']);
                    output("`0`n`c`bA nearby Typo Gremlin notices the peculiar tastiness of your previous comment.  Within moments, a small horde of them have descended upon your words, and consumed them.`b`c`n");
                } else {
                    output("`0`n`c`bThe Typo Gremlins turn up their nose at your latest comment - it's just too old.  They have no taste for stale words.`b`c`n");
                }
            }
            return false;
        }
        $hookcommand = array('command' => $comment, 'section' => $section);
        $returnedhook = modulehook("commentarycommand", $hookcommand);
        if (!$returnedhook['skipcommand']) {
            //if for some reason you're going to involve a command that can be a mix of upper and lower case, set $args['skipcommand'] and $args['ignore'] to true and handle it in postcomment instead.
            if (!$returnedhook['processed']) {
                output("`c`b`JCommand Not Recognized`b`0`nWhen you type in ALL CAPS, the game doesn't think you're talking to other players; it thinks you're trying to perform an action within the game.  For example, typing `#GREM`0 will remove the last comment you posted, as long as you posted it less than two minutes ago.  Typing `#AFK`0 or `#BRB`0 will turn your online status bar grey, so that people know you're `#A`0way `#F`0rom the `#K`0eyboard (or, if you prefer, that you'll `#B`0e `#R`0ight `#B`0ack).  Typing `#DNI`0 will let other players know that you're busy talking to one particular player - maybe somewhere off-camera - and that you don't want to be interrupted right now.`nSome areas have special hidden commands or other easter eggs that you can hunt for.  This time around, you didn't trigger anything special.`c`0`n");
            }
            return false;
        }
    }
    if ($section || $talkline || $comment) {
        $tcom = color_sanitize($comment);
        if ($tcom == "" || $tcom == ":" || $tcom == "::" || $tcom == "/me") {
            $emptypost = 1;
        } else {
            $comment = comment_sanitize($comment);
            injectcommentary($section, $talkline, $comment);
        }
    }
}