コード例 #1
0
 function constructor()
 {
     global $g_lang;
     avTable::constructor();
     $this->name = 'u_module';
     $this->controls[] = new avcId(&$this, 'id', '', '0', 0, 1, 1, '', 0);
     $this->controls[] = new avcLinkText(&$this, 'name', $g_lang['name'], '', 1, 1, 1, $g_lang['name'], 1, 20, 'page_permissions');
     $this->controls[] = new avcText(&$this, 'info', $g_lang['info'], '', 1, 1, 1, $g_lang['info'], 1, 40);
     $this->controls[] = new avcActions(&$this, 'info', 'info', '', 0, 0, 1, $g_lang['list_rowactions'], 0);
     $this->description = $g_lang['modules_description'];
 }
コード例 #2
0
 function constructor()
 {
     global $g_lang;
     avTable::constructor();
     $this->name = 'u_group';
     $this->controls[] = new avcId(&$this, 'id', '', '0', 0, 1, 1, 'id', 0);
     $this->controls[] = new avcLinkText(&$this, 'name', $g_lang['name'], '', 1, 1, 1, $g_lang['name'], 1, 20, 'page_users');
     $this->controls[] = new avcText(&$this, 'info', $g_lang['info'], '', 1, 1, 1, $g_lang['info'], 1, 40);
     $this->controls[] = new avcText(&$this, 'menu', $g_lang['groups_menu'], '', 1, 1, 0, $g_lang['groups_menu'], 1, 40);
     $this->controls[] = new avcCheckGroup(&$this, 'permissions', $g_lang['groups_permissions']);
     $this->controls[] = new avcActions(&$this, '', '', '', 0, 0, 1, $g_lang['list_rowactions'], 0);
     $this->description = $g_lang['groups_description'];
 }
コード例 #3
0
 function constructor()
 {
     global $g_lang;
     avTable::constructor();
     $this->name = 'u_permission';
     $this->pid = 'module_id';
     $this->parent = 'page_modules';
     $this->controls[] = new avcId(&$this, 'id', '', '0', 0, 1, 1, 'id', 0);
     $this->controls[] = new avcText(&$this, 'name', $g_lang['name'], '', 1, 1, 1, $g_lang['name'], 1, 20);
     $this->controls[] = new avcText(&$this, 'info', $g_lang['info'], '', 0, 1, 1, $g_lang['info'], 1, 40);
     $this->controls[] = new avcDbSelect(&$this, 'module_id', $g_lang['permissions_module'], '', 1, 1, 1, $g_lang['permissions_module'], 1, 'u_module', 'id', 'name');
     $this->controls[] = new avcActions(&$this, '', '', '', 0, 0, 1, $g_lang['list_rowactions'], 0);
     $this->description = $g_lang['permissions_description'];
 }
コード例 #4
0
 function constructor()
 {
     global $g_lang;
     avTable::constructor();
     $this->name = 'u_user_log';
     $this->controls[] = new avcId(&$this, 'id', '', '0', 0, 1, 0, '', 0);
     $this->controls[] = new avcHidden(&$this, 'username', $g_lang['log.username'], '', 1, 1, 1, $g_lang['log.username'], 1, 20);
     $this->controls[] = new avcTimeStamp(&$this, 'logindate', $g_lang['log.logindate'], '', 0, 1, 1, $g_lang['log.logindate'], 1);
     $this->controls[] = new avcHidden(&$this, 'host', $g_lang['log.host'], '', 0, 1, 1, $g_lang['log.host'], 1);
     //$this->controls[] = new avcHidden( &$this, 'browser', $g_lang['log.browser'], '', 0, 1, 1, $g_lang['log.browser'], 1, 20);
     $this->controls[] = new avcBrowser_type(&$this, 'browser', $g_lang['log.browser'], '', 0, 1, 1, $g_lang['log.browser'], 1, 20);
     $this->description = $g_lang['log.description'];
     $this->default_order = 'logindate desc, id desc';
 }
コード例 #5
0
 function constructor()
 {
     global $g_lang;
     avTable::constructor();
     $this->name = 'avworkcategory';
     $this->controls[] = new avcId(&$this, 'id', '', '0', 0, 1, 1, '', 0);
     $this->controls[] = new avcLinkText(&$this, 'name', $g_lang['news_subject'], '', 1, 1, 1, $g_lang['news_subject'], 1, 40, 'avworks');
     $this->controls[] = new avcText(&$this, 'info', $g_lang['news_info'], '', 1, 1, 1, $g_lang['news_info'], 1, 60);
     $this->controls[] = new avcImage(&$this, 'file', $g_lang['news_image'], '', 0, 1, 0, $g_lang['news_image'], 1, 'd:\\localhost\\avms\\files', '../files/');
     $this->controls[] = new avcText(&$this, 'sort_number', $g_lang['menuitem_sort'], '1', 0, 1, 1, $g_lang['menuitem_sort'], 1, 5);
     $this->controls[] = new avcActions(&$this, 'actions', '', '', 0, 0, 1, 'Veiksmai', 0);
     $this->description = 'Darbø kategorijos';
     //$g_lang['news_description'];
     $this->default_order = 'sort_number';
 }
コード例 #6
0
 function constructor()
 {
     global $g_lang, $link_table, $link_module, $module;
     empty($link_module) && ($link_module = $module);
     avTable::constructor();
     $this->name = 'languages';
     $this->controls[] = new avcId(&$this, 'id', '', '0', 0, 1, 1, '', 0);
     if (empty($link_table)) {
         $this->controls[] = new avcText(&$this, 'name', $g_lang['name'], '', 1, 1, 1, $g_lang['name'], 1, 20);
     } else {
         $this->controls[] = new avcLinkText(&$this, 'name', $g_lang['name'], '', 1, 1, 1, $g_lang['name'], 1, 20, $link_table, $link_module);
     }
     $this->controls[] = new avcText(&$this, 'lang_name', $g_lang['info'], '', 1, 1, 1, $g_lang['info'], 1, 40);
     $this->controls[] = new avcActions(&$this, '', '', '', 0, 0, 1, $g_lang['list_rowactions'], 0);
     $this->description = $g_lang['languages_description'];
 }
コード例 #7
0
 function constructor()
 {
     global $g_lang;
     avTable::constructor();
     $this->name = 'avcomments';
     $this->pid = 'parent_id';
     $this->parent = 'avworks';
     $this->controls[] = new avcId(&$this, 'id', '', '0', 0, 1, 1, 'id', 0);
     $this->controls[] = new avcText(&$this, 'subject', 'subjectas', '', 1, 1, 1, 'subjectas', 1, 20);
     $this->controls[] = new avcTextArea(&$this, 'info', 'info', '', 1, 1, 1, 'info', 1, 40, 5);
     $this->controls[] = new avcDate(&$this, 'posted', $g_lang['news_date'], date('Y.m.d'), 1, 1, 1, $g_lang['news_date'], 1);
     $this->controls[] = new avcDbSelect(&$this, 'parent_id', 'tetukas', '', 1, 1, 1, $g_lang['news_category'], 1, 'avnews', 'id', 'subject');
     $this->controls[] = new avcDbSelect(&$this, 'user_id', 'useris', '', 1, 1, 1, 'useris', 1, 'u_users', 'id', 'username');
     $this->controls[] = new avcHidden(&$this, 'table_name', '', $this->parent, 0, 1);
     $this->controls[] = new avcActions(&$this, '', '', '', 0, 0, 1, 'Veiksmai', 0);
     $this->description = 'Komentarai';
 }
コード例 #8
0
 function constructor()
 {
     global $g_lang, $g_ini, $pid, $page;
     avTable::constructor();
     $this->name = 'avworks_delete_log';
     $this->controls[] = new avcId(&$this, 'id', '', '0', 0, 1, 0, '', 0);
     $this->controls[] = new avcDbText(&$this, 'admin_id', 'Trynikas', '', 1, 1, 1, 'Trynikas', 1, 'u_users', 'id', 'username');
     $this->controls[] = new avcDate(&$this, 'posted', $g_lang['news_date'], date('Y.m.d'), 1, 1, 1, $g_lang['news_date'], 1);
     $this->controls[] = new avcDbSelect(&$this, 'work_category', 'Kategorija', '', 1, 1, 1, 'Kategorija', 1, 'avworkcategory', 'id', 'name');
     $this->controls[] = new avcDbText(&$this, 'work_submiter', 'Autorius', $GLOBALS['g_user_id'], 1, 1, 1, 'Autorius', 1, 'u_users', 'id', 'username');
     $this->controls[] = new avcHidden(&$this, 'work_subject', 'Pavadinimas', '', 0, 1, 1, 'Pavadinimas', 1);
     $this->controls[] = new avcDate(&$this, 'work_posted', 'Atsiustas', date('Y.m.d'), 1, 1, 1, 'Atsiustas', 1);
     $this->controls[] = new avcHidden(&$this, 'work_votecount', 'Balsai', '', 0, 1, 1, 'Balsai', 1);
     $this->controls[] = new avcHidden(&$this, 'work_summark', 'Suma', 0, 0, 1, 1, 'Suma', 1);
     $this->controls[] = new avcHidden(&$this, 'work_avgmark', 'Vid.', 0, 0, 1, 1, 'Vid.', 1);
     $this->description = 'Darbø trynimai';
     $this->default_order = 'posted desc, id desc';
 }
コード例 #9
0
 function action_delete()
 {
     global $id, $table;
     avTable::action_delete();
     if (!$id) {
         return;
     }
     if (is_array($id)) {
         $this->db->query("DELETE FROM u_user_info  WHERE uid = " . implode(" OR uid = ", $id));
         $this->db->query("DELETE FROM avworks  WHERE submiter  = " . implode(" OR submiter  = ", $id));
         $this->db->query("DELETE FROM avworks_stat  WHERE submiter  = " . implode(" OR submiter  = ", $id));
         $this->db->query("DELETE FROM avcomments  WHERE user_id  = " . implode(" OR user_id  = ", $id));
         $this->db->query("DELETE FROM avworkvotes  WHERE user_id  = " . implode(" OR user_id  = ", $id));
         $this->db->query("DELETE FROM forum_thread_list WHERE author_id  = " . implode(" OR author_id  = ", $id));
         $this->db->query("DELETE FROM forum_post_list WHERE author_id  = " . implode(" OR author_id  = ", $id));
     } else {
         $this->db->query("DELETE FROM u_user_info WHERE uid={$id}");
     }
 }
コード例 #10
0
 function show_action_list()
 {
     $out = avTable::show_action_list();
     return $out . '<input type="radio" name="action" value="change_visible"> ' . $GLOBALS['g_lang']['action_make_selected_records'] . ' <select name="visibility"><option value="1">' . $GLOBALS['g_lang']['action_visible'] . '</option><option value="0" selected>' . $GLOBALS['g_lang']['action_invisible'] . '</option></select><br>';
 }
コード例 #11
0
 function action_delete()
 {
     global $id, $table;
     avTable::action_delete();
     if (!$id) {
         return;
     }
     if (is_array($id)) {
         $this->db->query("DELETE FROM avcomments  WHERE table_name='{$this->name}' AND ( parent_id = " . implode(" OR parent_id = ", $id) . " )");
     } else {
         $this->db->query("DELETE FROM avcomments WHERE table_name='{$this->name}' AND parent_id={$id}");
     }
 }
コード例 #12
0
 function action_delete()
 {
     global $id, $table, $g_ini;
     if (!$id) {
         return;
     }
     if (is_array($id)) {
         $list = $this->db->get_result("SELECT file, thumbnail FROM avworks w WHERE (id = " . implode(" OR id = ", $id) . ")", 1);
         print_r($list);
         for ($i = 0; isset($list[$i]); $i++) {
             unlink($g_ini->read_var('avworks', 'works_dir') . $list[$i]['file']);
             if ('nothumbnail.gif' != $list[$i]['thumbnail']) {
                 unlink($g_ini->read_var('avworks', 'thumbnails_dir') . $list[$i]['thumbnail']);
             }
         }
         $this->db->query("DELETE FROM avcomments  WHERE table_name='{$this->name}' AND parent_id = " . implode(" OR parent_id = ", $id));
         $this->db->query("DELETE FROM avworkvotes  WHERE  work_id = " . implode(" OR work_id = ", $id));
         $this->db->query("DELETE FROM avworks_stat WHERE  work_id = " . implode(" OR work_id = ", $id));
     }
     avTable::action_delete();
 }