예제 #1
0
파일: content.php 프로젝트: blumine/vunsy
 function can_delete()
 {
     if (perm_chck($this->del)) {
         return TRUE;
     } else {
         return FALSE;
     }
 }
예제 #2
0
파일: remote.php 프로젝트: sigit/vunsy
 /**
  * that function you don't have to use it at all
  * it's the PHP backend to the directory chooser widget of gui class
  * it returns ist of directories within the passed directory via POST
  * */
 function dir()
 {
     if (!perm_chck('edit')) {
         show_error("permission denied");
     }
     $root = '';
     $_POST['dir'] = urldecode($_POST['dir']);
     if (file_exists($root . $_POST['dir'])) {
         $files = scandir($root . $_POST['dir']);
         natcasesort($files);
         if (count($files) > 2) {
             /* The 2 accounts for . and .. */
             echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
             // All dirs
             foreach ($files as $file) {
                 if (file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && is_dir($root . $_POST['dir'] . $file)) {
                     echo "<li class=\"file ext_file\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "/\">Choose " . htmlentities($file) . "</a></li>";
                     echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "/\">" . htmlentities($file) . "</a></li>";
                 }
             }
             echo "</ul>";
         }
     }
 }
예제 #3
0
파일: section.php 프로젝트: sigit/vunsy
 function can_view()
 {
     if (!(empty($this->view) or perm_chck($this->view))) {
         return FALSE;
     } else {
         return TRUE;
     }
 }
예제 #4
0
파일: app.php 프로젝트: blumine/vunsy
 function can_view()
 {
     return perm_chck($this->perm);
 }
예제 #5
0
 /**
  * true if the user can view that content
  * false if the user not permitted to see it
  * 
  * @return boolean if that content could be viewed or not ,
  * depending on the current system conditions 
  **/
 public function can_view()
 {
     return empty($this->view) or perm_chck($this->view);
 }