コード例 #1
0
 } else {
     if (isset($_REQUEST['spoiler_only']) && $_REQUEST['spoiler_only'] == 1) {
         $spoiler_only = true;
     } else {
         $spoiler_only = false;
     }
     if (isset($_REQUEST['pictures']) && $_REQUEST['pictures'] == 'big') {
         tpl_set_var('pictures', viewcache_getfullsizedpicturestable($cache_id, true, $spoiler_only, $cache_record['picturescount'], $disable_spoiler_view));
     } else {
         if (isset($_REQUEST['pictures']) && $_REQUEST['pictures'] == 'small') {
             tpl_set_var('pictures', viewcache_getpicturestable($cache_id, true, true, $spoiler_only, true, $cache_record['picturescount'], $disable_spoiler_view));
         } else {
             if (isset($_REQUEST['pictures']) && $_REQUEST['pictures'] == 'no') {
                 tpl_set_var('pictures', "");
             } else {
                 tpl_set_var('pictures', viewcache_getpicturestable($cache_id, true, true, false, false, $cache_record['picturescount'], $disable_spoiler_view));
             }
         }
     }
     tpl_set_var('hidepictures_start', '');
     tpl_set_var('hidepictures_end', '');
 }
 // add OC Team comment
 if ($usr['admin'] && isset($_POST['rr_comment']) && $_POST['rr_comment'] != "" && $_SESSION['submitted'] != true) {
     $sender_name = $usr['username'];
     $comment = nl2br($_POST['rr_comment']);
     $date = date("d-m-Y H:i:s");
     $octeam_comment = '<b><span class="content-title-noshade txt-blue08">' . tr('date') . ': ' . $date . ', ' . tr('add_by') . ' ' . $sender_name . '</span></b><br/>' . $comment;
     $sql = "UPDATE cache_desc\n                    SET rr_comment=CONCAT('" . sql_escape($octeam_comment) . "<br/><br/>', rr_comment),\n                            last_modified = NOW()\n                    WHERE cache_id='" . sql_escape(intval($cache_id)) . "'";
     @mysql_query($sql);
     $_SESSION['submitted'] = true;
コード例 #2
0
ファイル: viewcache.php プロジェクト: kojoty/opencaching-pl
     tpl_set_var('hidepictures_start', '<!--');
     tpl_set_var('hidepictures_end', '-->');
 } else {
     if (isset($_REQUEST['spoiler_only']) && $_REQUEST['spoiler_only'] == 1) {
         $spoiler_only = true;
     } else {
         $spoiler_only = false;
     }
     if (isset($_REQUEST['pictures']) && $_REQUEST['pictures'] == 'big') {
         tpl_set_var('pictures', viewcache_getfullsizedpicturestable($cache_id, true, $spoiler_only, $cache_record['picturescount'], $disable_spoiler_view));
     } elseif (isset($_REQUEST['pictures']) && $_REQUEST['pictures'] == 'small') {
         tpl_set_var('pictures', viewcache_getpicturestable($cache_id, true, true, $spoiler_only, true, $cache_record['picturescount'], $disable_spoiler_view));
     } elseif (isset($_REQUEST['pictures']) && $_REQUEST['pictures'] == 'no') {
         tpl_set_var('pictures', "");
     } else {
         tpl_set_var('pictures', viewcache_getpicturestable($cache_id, true, true, false, false, $geocache->getPicturesCount(), $disable_spoiler_view));
     }
     tpl_set_var('hidepictures_start', '');
     tpl_set_var('hidepictures_end', '');
 }
 // add OC Team comment
 if ($usr['admin'] && isset($_POST['rr_comment']) && $_POST['rr_comment'] != "" && $_SESSION['submitted'] != true) {
     $sender_name = $usr['username'];
     $comment = nl2br($_POST['rr_comment']);
     $date = date("d-m-Y H:i:s");
     $octeam_comment = '<b><span class="content-title-noshade txt-blue08">' . tr('date') . ': ' . $date . ', ' . tr('add_by') . ' ' . $sender_name . '</span></b><br/>' . $comment;
     XDb::xSql("UPDATE cache_desc\n                SET rr_comment = CONCAT('" . XDb::xEscape($octeam_comment) . "<br/><br/>', rr_comment),\n                    last_modified = NOW()\n                WHERE cache_id= ? ", $cache_id);
     $_SESSION['submitted'] = true;
     // send notify to owner cache and copy to OC Team
     $query1 = "SELECT `email` FROM `user` WHERE `user_id`=:1";
     $owner_email = $dbc->multiVariableQuery($query1, $geocache->getOwner()->getUserId());