コード例 #1
0
ファイル: main.php プロジェクト: redmexico/XoopsCore
         $id = $comments_arr[$i]->getVar('id');
         $comments_poster_uname = $xoops->getConfig('anonymous');
         if ($comments_arr[$i]->getVar('uid') > 0) {
             $poster = $member_handler->getUser($comments_arr[$i]->getVar('uid'));
             if (is_object($poster)) {
                 $comments_poster_uname = '<a href="' . \XoopsBaseConfig::get('url') . '/userinfo.php?uid=' . $comments_arr[$i]->getVar('uid') . '">' . $poster->getVar('uname') . '</a>';
             }
         }
         $comments_icon = $comments_arr[$i]->getVar('icon') == '' ? '/images/icons/no_posticon.gif' : '/images/subject/' . htmlspecialchars($comments_arr[$i]->getVar('icon'), ENT_QUOTES);
         $comments_icon = '<img src="' . \XoopsBaseConfig::get('url') . $comments_icon . '" alt="" />';
         $comments['comments_id'] = $id;
         $comments['comments_poster'] = $comments_poster_uname;
         $comments['comments_icon'] = $comments_icon;
         $comments['comments_title'] = '<a href="main.php?op=comments_jump&amp;item_id=' . $comments_arr[$i]->getVar("id") . '">' . $comments_arr[$i]->getVar("title") . '</a>';
         $comments['comments_ip'] = $comments_arr[$i]->getVar('ip');
         $comments['comments_date'] = XoopsLocale::formatTimeStamp($comments_arr[$i]->getVar('created'));
         $comments['comments_text'] = $myts->undoHtmlSpecialChars($comments_arr[$i]->getVar('text'));
         $comments['comments_status'] = @$status_array2[$comments_arr[$i]->getVar('status')];
         $comments['comments_date_created'] = XoopsLocale::formatTimestamp($comments_arr[$i]->getVar('created'), 'm');
         $comments['comments_modid'] = @$module_array[$comments_arr[$i]->getVar('modid')];
         //$comments['comments_view_edit_delete'] = '<img class="cursorpointer" onclick="display_dialog('.$id.', true, true, \'slide\', \'slide\', 300, 500);" src="images/icons/view.png" alt="'._AM_COMMENTS_VIEW.'" title="'._AM_COMMENTS_VIEW.'" /><a href="admin/comments/comment_edit.php?id='.$id.'"><img src="./images/icons/edit.png" border="0" alt="'._EDIT.'" title="'._EDIT.'"></a><a href="admin/comments/comment_delete.php?id='.$id.'"><img src="./images/icons/delete.png" border="0" alt="'._DELETE.'" title="'._DELETE.'"></a>';
         $xoops->tpl()->appendByRef('comments', $comments);
         $xoops->tpl()->appendByRef('comments_popup', $comments);
         unset($comments);
     }
     if ($comments_count > $comments_limit) {
         $nav = new XoopsPageNav($comments_count, $comments_limit, $comments_start, 'comments_start', 'comments_module=' . $comments_module . '&amp;comments_status=' . $comments_status);
         $xoops->tpl()->assign('nav', $nav->renderNav());
     }
 }
 break;