Example #1
0
 public function Show($for_user = false)
 {
     if (!$this->Exist()) {
         return 'Error : comment';
     }
     $line = getDB()->fetchRow("SELECT DATE_FORMAT(time, '%d.%m.%Y | %H:%i:%S') AS time, message, item_id FROM `{$this->db}` WHERE `id`='" . $this->id . "'");
     if (!$line) {
         return '';
     }
     $admin_buttons = '';
     $female_mark = '';
     $text = Message::BBDecode($line['message']);
     $date = $line['time'];
     $id = $this->id;
     $item_id = $line['item_id'];
     $this_user = new User($this->user_id);
     $user_id = $this->user_id;
     $user_name = $this_user->id() ? $this_user->name() : 'Banned';
     $user_female = $this_user->id() ? $this_user->isFemale() : false;
     $user_img_get = $this_user->getSkinLink(true);
     if ($for_user and ($for_user->getPermission('adm_comm') or $for_user->id() == $this->user_id)) {
         ob_start();
         include $this->GetView('comments_admin.html');
         $admin_buttons = ob_get_clean();
     }
     if ($user_female) {
         $female_mark = $this->ShowPage('comments_girl.html');
     }
     ob_start();
     if ($for_user) {
         include $this->GetView('comments.html');
     } else {
         include $this->GetView('comments_unauth.html');
     }
     return ob_get_clean();
 }
Example #2
0
             break;
         case 1902:
             $message .= lng('AUTH_EXIST_EMAIL');
             break;
         default:
             $modifed = false;
             break;
     }
     if ($modifed) {
         $message .= "\n";
     }
 }
 $ajax_message['name'] = $mod_user->name();
 $ajax_message['group'] = $mod_user->getGroupName();
 $ajax_message['id'] = $mod_user->id();
 $ajax_message['skin_link'] = $mod_user->getSkinLink(false, '&', true);
 $ajax_message['mskin_link'] = $mod_user->getSkinLink(true, '&', true);
 if (file_exists($mod_user->getCloakFName())) {
     $ajax_message['cloak'] = 1;
 }
 if ($mod_user->defaultSkinTrigger()) {
     $ajax_message['skin'] = 1;
 }
 if ($message) {
     aExit(2, $message);
 } elseif (!$rnum) {
     aExit(100, $message);
 } else {
     aExit(0, lng('PROFILE_COMPLITE'));
 }
 break;