public static function Active() { $p_model = new TModel('hook'); $data['hook_effect'] = 'P:TNavigator:AddItem'; $data['hook_function_name'] = 'LinkEditor'; $data['hook_plugin'] = __CLASS__; $p_model->Create($data); $data['hook_effect'] = 'R:TNavigator:Render'; $data['hook_function_name'] = 'RenderEditor'; $data['hook_plugin'] = __CLASS__; $p_model->Create($data); }
$result['value'] = 'افزودن با موفقیت انجام نشد'; echo json_encode($result); die; } } $result['success'] = false; $result['value'] = 'اعتبار حساب کاربری شما برای لایک خدشه دار است.'; echo json_encode($result); break; case 'comment': if (isset($_COOKIE['mid'])) { $valid = array('comment_parent', 'comment_text', 'comment_topic_id'); $edit = promis($clean, $valid); $m = new TModel('comment', 'comment_'); $data = array('comment_parent' => $clean['comment_parent'], 'comment_text' => $clean['comment_text'], 'comment_topic_id' => $clean['comment_topic_id'], 'comment_member_id' => $_COOKIE['mid'], 'comment_time' => time(), 'comment_ip' => _ipi()); $tmp = $m->Create($data); if (isset($clean['ajax'])) { $result['success'] = $tmp != false ? true : false; echo json_encode($result); die; } else { GoBack(); } } else { $result['value'] = 'شما بایستی وارده شده باشید'; echo json_encode($result); die; } break; default: break;