17 lines
740 B
PHP
17 lines
740 B
PHP
<?php
|
|
class comment {
|
|
public static function new_comment($id){
|
|
$hasrated = \SQL\GO_TRAINER_GET_HASRATED::Q1(array(\SYSTEM\SECURITY\Security::getUser(), $id));
|
|
if (\SYSTEM\SECURITY\Security::isLoggedIn() && $hasrated){
|
|
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_guide/tpl/default_new_comment.tpl'))->SERVERPATH());
|
|
}
|
|
elseif (\SYSTEM\SECURITY\Security::isLoggedIn()) {
|
|
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_guide/tpl/default_new_comment_loggedin.tpl'))->SERVERPATH());
|
|
}
|
|
else{
|
|
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_guide/tpl/default_new_comment_loggedout.tpl'))->SERVERPATH());
|
|
}
|
|
|
|
}
|
|
}
|