Пример #1
0
    function get_formulaire($M = array())
    {
        global $array_magic_type;
        extract(stripslashes_r($M));
        ?>
		
		    <form method="POST" action="<?php 
        echo get_link("Magics", "Admin");
        ?>
">
                <?php 
        echo forumulaire_db('Caranille_Magics', $M);
        ?>
			    <br/>
				<input type="submit" name="Back" value="Annuler" />
		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
		    </form>
<?php 
    }
Пример #2
0
function display_page_content()
{
    ?>

    <div id="edit-header" class="eventtypelist">		
		<div class="nav-left column">
			<h1>Edit Existing Event Types</h1>
		</div>
		<div class="nav-right column">
			<a class="hcd_button" href="<?php 
    echo get_link("admin/add_type");
    ?>
">Add an Event Type</a>
		</div>
		<div class="clearleft"></div>
	</div>
	<p class="announce"><b>Event Colors:</b> Each Event Type is associated with a color that you may customize. We will setup colors that work with the color palette of your website and they will be displayed on the calendar where the event is listed.</p>
	
	<div id="table-header" class="eventlist">
		<strong class="item-link">Click Name to Edit</strong>
		<span class="item-filename">Color Preview</span>
	</div>
	<ul id="listitems" class="managelist">
<?php 
    $types = EventTypes::FindAll();
    foreach ($types as $type) {
        echo "\t\t\t<li><a class=\"item-link\" href=\"" . get_link("/admin/edit_type/{$type->id}") . "\">{$type->name}</a> <span class=\"colorpreview\" style=\"background-color: {$type->color}; color: {$type->text_color};\">{$type->name}</span></li>\n";
    }
    ?>
	
	</ul>

<?php 
}
Пример #3
0
 public function index()
 {
     $this->load->model("user_manager_model");
     $this->user_manager_model->set_user_logged_out();
     redirect(get_link("admin_no_access"));
     return;
 }
Пример #4
0
    function get_formulaire_Menu($Menu = array())
    {
        extract(stripslashes_r($Menu));
        if (isset($Menu_Module)) {
            set_values_db('Caranille_Menus', 'Menu_Link', list_menu($Menu_Module));
        }
        ?>
				<form method="POST" action="<?php 
        echo get_link("Menus", "Admin");
        ?>
">
				    <h2><?php 
        echo request_confirm('Add') ? 'Ajout' : 'Modification';
        ?>
 du Menu</h2>
    				<?php 
        echo forumulaire_db('Caranille_Menus', $Menu);
        ?>
    			    <br/>
    				<input type="submit" name="Back" value="Annuler" />
    		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
    				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
    		    </form>
<?php 
    }
Пример #5
0
 function get_crumbs()
 {
     global $page;
     $_TITLE = get_title();
     //массив заголовков
     if ($page == 'main') {
         $crumbs = '';
     } else {
         foreach ($_TITLE as $k => $v) {
             switch ($k) {
                 //case 0: $crumbs = $crumbs . '<a href="'.get_link('main').'">'.$v.'</a>'; break;
                 case 1:
                     if ($page == 'static') {
                         $crumbs = $crumbs . ' <span>:: ' . $v . '</span>';
                     } else {
                         $crumbs = $crumbs . ' <span>:: </span><a href="' . get_link('page') . '">' . $v . '</a>';
                     }
                     break;
                 case 2:
                     $crumbs = $crumbs . ' <span>:: </span><a href="' . get_link('category') . '">' . $v . '</a>';
                     break;
                 case 3:
                     $crumbs = $crumbs . ' <span>:: ' . $v . '</span>';
                     break;
             }
         }
     }
     return $crumbs;
 }
Пример #6
0
function display_page_content()
{
    $section_name = requestIdParam();
    $section = Sections::FindByName($section_name);
    $item_name = getRequestVarAtIndex(3);
    $item = Items::FindByName($item_name);
    $gallery = $item->getGallery();
    ?>

		<h1><?php 
    echo $item->display_name;
    ?>
</h1>
<?php 
    $next_item = $item->findNext($section);
    $prev_item = $item->findPrev($section);
    if ($prev_item) {
        echo "\t\t\t\t<a href=\"" . get_link("portfolio/item/{$section_name}/" . $prev_item->name) . "\">previous</a>\n";
    }
    if ($next_item) {
        echo "\t\t\t\t<a href=\"" . get_link("portfolio/item/{$section_name}/" . $next_item->name) . "\">next</a>\n";
    }
    echo $item->content;
    foreach ($gallery->get_photos() as $photo) {
        echo "<img src=\"/" . $photo->getPublicUrl() . "\" /><br />";
    }
}
Пример #7
0
    function formulaire($r = array())
    {
        global $array_Fragments_type;
        set_values_db('Caranille_Fragments', 'Fragment_Type', $array_Fragments_type);
        ?>
	        
			<form method="POST" action="<?php 
        echo get_link("Fragments", "Admin");
        ?>
">
			    <?php 
        echo forumulaire_db('Caranille_Fragments', $r);
        ?>
			    <br/>
				<input type="submit" name="Back" value="Annuler" />
		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
		    </form>
<?php 
    }
Пример #8
0
    function get_formulaire_Building($Building = array())
    {
        ?>
				<form method="POST" action="<?php 
        echo get_link('Buildings', 'Admin');
        ?>
">
				    <h2><?php 
        echo request_confirm('Add') ? 'Ajout' : 'Modification';
        ?>
 du Batiment</h2>
    				<?php 
        echo forumulaire_db('Caranille_Building', $Building);
        ?>
    			    <br/>
    				<input type="submit" name="Back" value="Annuler" />
    		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
    				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
    		    </form>
<?php 
    }
Пример #9
0
    function cpu($id)
    {
        $this->id = $id;
        // Get the disk informations
        $q0 = get_link()->prepare('SELECT 
									c.id AS ID,
									c.logical_id AS LOGICALID,
									c.max_clock_speed AS MAXCLOCKSPEED,
									c.name AS NAME,
									c.created_date AS CREATED_DATE,
									c.created_id AS CREATED_ID,
									c.edited_date AS EDITED_DATE,
									c.edited_id AS EDITED_ID,
									c.deleted_date AS DELETED_DATE,
									c.deleted_id AS DELETED_ID
								FROM ' . get_ini('BDD_PREFIX') . 'cmdb_dev_os_cpu c 
								WHERE id=:id AND deleted_date=0');
        $q0->execute(array('id' => $id));
        $r0 = $q0->fetch(PDO::FETCH_OBJ);
        if (isset($r0->ID)) {
            $this->logicalId = $r0->LOGICALID;
            $this->maxClockSpeed = $r0->MAXCLOCKSPEED;
            $this->name = $r0->NAME;
            $this->createdDate = $r0->CREATED_DATE;
            $this->createdID = $r0->CREATED_ID;
            $this->editedDate = $r0->EDITED_DATE;
            $this->editedId = $r0->EDITED_ID;
            $this->deletedDate = $r0->DELETED_DATE;
            $this->deltedId = $r0->DELETED_ID;
        } else {
            // TODO add log management
            echo 'The cpu does not exist.';
            exit(100);
        }
    }
Пример #10
0
    function get_formulaire_Caracteristique($Caracteristique = array())
    {
        extract(stripslashes_r($Caracteristique));
        ?>
				<form method="POST" action="<?php 
        echo get_link("Caracteristiques", "Admin");
        ?>
">
				    <h2><?php 
        echo request_confirm('Add') ? 'Ajout' : 'Modification';
        ?>
 du Caracteristique</h2>
    				<?php 
        echo forumulaire_db('Caranille_Caracteristiques', $Caracteristique);
        ?>
    			    <br/>
    				<input type="submit" name="Back" value="Annuler" />
    		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
    				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
    		    </form>
<?php 
    }
Пример #11
0
    function formulaire($Page = array())
    {
        ?>
				<form method="POST" action="<?php 
        echo get_link("Pages", "Admin");
        ?>
">
				    <h2><?php 
        echo request_confirm('Add') ? 'Ajout' : 'Modification';
        ?>
 de Page</h2>
    				<?php 
        echo forumulaire_db('Caranille_Pages', $Page);
        ?>
    			    <br/>
    				<input type="submit" name="Back" value="Annuler" />
    		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
    				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
    		    </form>
<?php 
    }
Пример #12
0
function content_valid_mail($account)
{
    global $_url, $MMORPG_Name, $MMORPG_Description;
    //-----------------------------------------------
    //DECLARE LES VARIABLES
    //-----------------------------------------------
    $url_valid = get_link('End', 'Register', array('Valid' => 'Activer', 'Account_Key' => $account['Account_Key'], 'Account_Email' => $account['Account_Email']));
    $message_texte = 'Bonjour,' . "\n\n" . 'utiliser ce lien dans votre navigateur pour valider votre inscription' . "\n\n" . $url_valid;
    $message_html = '<html> 
     <head> 
     <title>' . $MMORPG_Name . ' - valider votre inscription</title> 
     </head> 
     <body>
		' . $MMORPG_Description . '<hr/>
		Vous venez d\'effectuer l\'inscription sur le site <a href="' . $_url . '">' . $MMORPG_Name . '</a> .<br/><br/>
        Pour valider votre inscription, cliquez sur ce bouton :
        <form method="post" action="' . get_link('End', 'Register') . '">
            <input type="hidden" name="Account_Key" value="' . $account['Account_Key'] . '"/>
            <input type="hidden" name="Account_Email" value="' . $account['Account_Email'] . '"/>
            <input type="submit" name="Valid" value="Activer"/>
        </form>
        
        Ou sur <a href="' . $url_valid . '">ce lien</a>
     </body> 
     </html>';
    debug_log($message_html, false);
    return array($message_texte, $message_html);
}
    function environment($id)
    {
        $this->id = $id;
        // Get the disk informations
        $q0 = get_link()->prepare('SELECT 
									e.id AS ID,
									e.id_parent AS ID_PARENT,
									e.name AS NAME,
									e.created_date AS CREATED_DATE,
									e.created_id AS CREATED_ID,
									e.edited_date AS EDITED_DATE,
									e.edited_id AS EDITED_ID,
									e.deleted_date AS DELETED_DATE,
									e.deleted_id AS DELETED_ID
								FROM ' . get_ini('BDD_PREFIX') . 'cmdb_environments e 
								WHERE id=:id AND deleted_date=0');
        $q0->execute(array('id' => $id));
        $r0 = $q0->fetch(PDO::FETCH_OBJ);
        if (isset($r0->ID)) {
            $this->parentId = $r0->ID_PARENT;
            $this->name = $r0->NAME;
            $this->createdDate = $r0->CREATED_DATE;
            $this->createdID = $r0->CREATED_ID;
            $this->editedDate = $r0->EDITED_DATE;
            $this->editedId = $r0->EDITED_ID;
            $this->deletedDate = $r0->DELETED_DATE;
            $this->deltedId = $r0->DELETED_ID;
        } else {
            // TODO add log management
            echo 'The environment don\'t exist.';
            exit(100);
        }
    }
Пример #14
0
    function formulaire($r = array())
    {
        set_values_db('Caranille_Items', 'Item_Type', array('Parchment'));
        ?>
	        
            <form method="POST" action="<?php 
        echo get_link("Parchments", "Admin");
        ?>
">
            <?php 
        echo forumulaire_db('Caranille_Items', $r);
        ?>
			    <br/>
			<?php 
        echo line_db('Caranille_Craftings', 'Crafting_Fragment_ID');
        ?>
				<input type="submit" name="Back" value="Annuler" />
		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
		    </form>
<?php 
        if (isset($r["Item_ID"])) {
            $loots = list_db('foreign_list', array('table' => 'Caranille_Craftings', 'ID' => 'Crafting_Item_ID', 'value' => $r["Item_ID"]));
            list_html($loots, "Caranille_Craftings", "Crafts", array('Crafting_Fragment_ID'), true, false);
        }
    }
Пример #15
0
 public function index()
 {
     $this->load->model("user_manager_model");
     $this->load->model("module_manager_model");
     $user_info =& $this->user_manager_model->get_user_info();
     $this->data['modules'] = array();
     $modules = $this->module_manager_model->get_user_modules_names($user_info->get_id());
     foreach ($modules as $module) {
         $name = $module['name'];
         $link = $module['link'];
         $id = $module['id'];
         $model_name = $module['model'];
         if (!$model_name) {
             continue;
         }
         $this->load->model($model_name . "_model");
         $model = $this->{$model_name . "_model"};
         if (!method_exists($model, "get_dashbord_info")) {
             continue;
         }
         $text = $model->{"get_dashbord_info"}();
         $this->data['modules'][] = array("id" => $id, "name" => $name, "link" => $link, "text" => $text);
     }
     $this->lang->load('ae_dashboard', $this->selected_lang);
     $this->data['lang_pages'] = get_lang_pages(get_link("admin_dashboard", TRUE));
     $this->data['header_title'] = $this->lang->line("dashboard");
     $this->send_admin_output("dashboard");
     return;
 }
Пример #16
0
function display_page_content()
{
    ?>
					
					<h1>Choose Blog to Edit</h1>
						
					<div class="listhead"><label>Click Name to Edit</label>Associated User</div>
					<ul id="list_items">							
<?php 
    $blogs = Blogs::FindAll();
    foreach ($blogs as $blog) {
        $user = Users::FindById($blog->user_id);
        ?>
						<li>
							<a href="<?php 
        echo get_link("/admin/edit_blog/" . $blog->user_id);
        ?>
"><?php 
        echo $blog->name;
        ?>
</a>
							<?php 
        echo $user->email;
        ?>
						</li>
<?php 
    }
    ?>
					</ul>
						
<?php 
}
Пример #17
0
function display_page_content()
{
    $lists = NLLists::FindAll();
    ?>

	<div id="edit-header" class="blaster">
		<div class="nav-left column">
    		<h1>Edit Mailing Lists</h1>
		</div>
		<div class="nav-right column">
            <a href="<?php 
    echo get_link("admin/add_list");
    ?>
" class="hcd_button">Add a New Mailing List</a> 
		</div>
		<div class="clearleft"></div>
	</div>
					
	<p>Click on the list name to edit it.</p>
	<ul id="list_items" class="managelist">
<?php 
    if (count($lists) > 0) {
        foreach ($lists as $list) {
            echo "\t\t<li><a class=\"item-link\" href=\"" . get_link("/admin/edit_list/{$list->id}") . "\">{$list->display_name}</a></li>\n";
        }
    } else {
        echo "<h3 class=\"empty-list\">There are no lists to edit. <a class=\"short\" href=\"" . get_link("admin/add_list") . "\">Add one if you like</a>.</h3>";
    }
    ?>

	</ul>
<?php 
}
Пример #18
0
 public function index()
 {
     $this->lang->load('ae_change_pass', $this->selected_lang);
     if ($this->input->post()) {
         $this->lang->load('error', $this->selected_lang);
         if ($this->input->post("prev_pass") && $this->input->post("new_pass") && $this->input->post("repeat_pass")) {
             if ($this->input->post("new_pass") === $this->input->post("repeat_pass")) {
                 $prev_pass = $this->input->post("prev_pass");
                 $new_pass = $this->input->post("new_pass");
                 $this->load->model("user_manager_model");
                 if ($this->user_manager_model->change_logged_user_pass($prev_pass, $new_pass)) {
                     $message = $this->lang->line("success_password_change");
                 } else {
                     $message = $this->lang->line("match_prev_password");
                 }
             } else {
                 $message = $this->lang->line("match_repeat_password");
             }
         } else {
             $message = $this->lang->line("fill_all_fields");
         }
     }
     if (isset($message)) {
         $this->data['message'] = $message;
     }
     $this->data['lang_pages'] = get_lang_pages(get_link("admin_change_pass", TRUE));
     $this->data['header_title'] = $this->lang->line("change_pass");
     $this->send_admin_output("change_pass");
     return;
 }
Пример #19
0
 public function install()
 {
     $user_pass = "******";
     echo "<h1>Installing Burge CMF</h1>";
     $this->log_manager_model->info("CMF_INSTALL");
     $this->load->model("module_manager_model");
     $this->module_manager_model->install_module("module_manager");
     $this->module_manager_model->install_module("user_manager");
     $this->load->model("user_manager_model");
     $props = array("user_name" => $user_pass, "user_email" => $user_pass, "user_pass" => $user_pass, "user_code" => 10);
     $this->user_manager_model->add_if_not_exist($props);
     $user = new User($user_pass);
     echo "Username: {$user_pass}<br>Pass: {$user_pass}<br>";
     echo "<h2>Login <a href='" . get_link("admin_login") . "'>here</a>.</h2>";
     $this->module_manager_model->install_module("access_manager");
     $this->module_manager_model->install_module("hit_counter");
     $this->module_manager_model->install_module("post_manager");
     $this->module_manager_model->install_module("log_manager");
     $this->module_manager_model->install_module("constant_manager");
     $default_lang = array_keys(LANGUAGES())[0];
     $modules_info = $this->module_manager_model->get_all_modules_info($default_lang);
     $modules = array();
     foreach ($modules_info as $md) {
         $modules[] = $md['module_id'];
     }
     $this->load->model("access_manager_model");
     $this->access_manager_model->set_allowed_modules_for_user($user->get_id(), $modules);
     return;
 }
Пример #20
0
    function get_formulaire_Level($level = array())
    {
        ?>
			
			<form method="POST" action="<?php 
        echo get_link("Levels", "Admin");
        ?>
">
                <?php 
        echo forumulaire_db('Caranille_Levels', $level);
        ?>
			    <br/>
				<input type="submit" name="Back" value="Annuler" />
		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
		    </form>
<?php 
    }
Пример #21
0
function display_page_content()
{
    $section_name = requestIdParam();
    $section = Sections::FindByName($section_name);
    $items = $section->findItems();
    ?>
		
		<div id="right">
			<h3>Item Thumbnail</h3>
		</div>
		<div id="center">
			<h3>All the <?php 
    echo $section->display_name;
    ?>
</h3>
			<?php 
    echo $section->content;
    ?>
		<?php 
    echo "<ul>\r\n";
    foreach ($items as $item) {
        echo "\t\t\t<li><a href=\"" . get_link("portfolio/item/{$section_name}/" . $item->name) . "\">{$item->display_name}</a></li>\r\n";
    }
    echo "\t\t</ul>\r\n";
    ?>
		</div>
		<?php 
}
Пример #22
0
 public function common($params)
 {
     $Register = Register::getInstance();
     $output = '';
     if (!strpos($params, '{{ users_rating }}')) {
         return $params;
     }
     $Cache = new Cache();
     $Cache->lifeTime = 600;
     if ($Cache->check('pl_users_rating')) {
         $users = $Cache->read('pl_users_rating');
         $users = json_decode($users, true);
     } else {
         $users = $this->DB->select('users', DB_ALL, array('order' => '`rating` DESC', 'limit' => $this->limit));
         //$users = $this->DB->query($sql);
         $Cache->write(json_encode($users), 'pl_users_rating', array());
     }
     if (!empty($users)) {
         foreach ($users as $key => $user) {
             $link = get_link($user['name'], getProfileUrl($user['id']));
             $ava = file_exists(ROOT . '/sys/avatars/' . $user['id'] . '.jpg') ? get_url('/sys/avatars/' . $user['id'] . '.jpg') : get_url('/sys/img/noavatar.png');
             $output .= sprintf($this->wrap, $ava, $link, $user['rating'], $user['posts']);
         }
     }
     $output .= '<div class="etopu">' . get_link('Весь рейтинг', '/users/index?order=rating') . '</div>';
     return str_replace('{{ users_rating }}', $output, $params);
 }
Пример #23
0
 private function modify_constants()
 {
     $res = FALSE;
     $constants = $this->constant_manager_model->get_all();
     foreach ($constants as $cons) {
         $key = $cons['constant_key'];
         //check if user has been deleted
         $delete_string = "delete_" . $key;
         $post_delete = $this->input->post($delete_string);
         if ($post_delete === "on") {
             $this->constant_manager_model->delete($key);
             $res = TRUE;
             continue;
         }
         $changed_string = "changed_" . $key;
         $post_changed = $this->input->post($changed_string);
         if ($post_changed !== "on") {
             continue;
         }
         $value_string = "value_" . $key;
         $post_value = $this->input->post($value_string);
         $value = trim($post_value);
         if ($value) {
             $this->constant_manager_model->set($key, $value);
             $res = TRUE;
         }
     }
     if ($res) {
         set_message($this->lang->line("modified_successfully"));
     }
     return redirect(get_link("admin_constant"));
 }
Пример #24
0
function display_page_content()
{
    if (!requestIdParam()) {
        $documents = Documents::FindAll("DESC");
    } else {
        $documents = Documents::FindByFiletype(requestIdParam());
    }
    ?>
	
	<div id="edit-header" class="documentnav">
		<div class="nav-left column">
    		<h1>Choose a Document to Edit</h1>
		</div>
		<div class="nav-right column">
            <a href="<?php 
    echo get_link("admin/add_document");
    ?>
" class="hcd_button">Add a New Document</a>
		</div>
		<div class="clearleft"></div>
	</div>
	
	<p class="announce">Documents are defined as downloadable files or forms. PDFs, DOCs, and the like are acceptable. You may use this feature to make high resolution images downloadable as well. If the image is too large to upload, and you get an error, you may want to compress the image with StuffIt (.sit), WinZip (.zip), or ZipIt (.zip).</p>
	
<?php 
    if (count($documents) > 0) {
        ?>
			
	<div id="table-header" class="documents">
		<strong class="item-link">Document Name</strong>
		<span class="item-filename">Filename</span>
		<span class="item-viewlink">View file in new window</span>
	</div>
	
		<?php 
        //$filetypes = Documents::FindUniqueFiletypes();
        if (isset($filetypes) && count($filetypes) > 1) {
            echo "<ul class=\"menu tabs\">\n\t\t<li>Show Only: </li>\n";
            foreach ($filetypes as $type) {
                echo "\t\t<li><a href=\"" . get_link("admin/list_documents/" . $type->file_type) . "\">{$type->file_type}</a></li>\n";
            }
            echo "\t\t<li><a class=\"hcd_button\" href=\"" . get_link("admin/list_documents/") . "\">Show All</a></li>\n\t</ul>\n ";
        }
        ?>
	
	<ul id="listitems" class="managelist">
		<?php 
        foreach ($documents as $document) {
            echo "\t\t<li>\n\t\t\t<span class=\"item-link\"><a href=\"" . get_link("/admin/edit_document/{$document->id}") . "\">{$document->name} <small>EDIT</small></a></span>\n\t\t\t<span class=\"item-filename\">{$document->filename}</span>\n\t\t\t<span class=\"item-viewlink\"><a href=\"" . $document->getPublicUrl() . "\" target=\"_blank\">View file</a></span>\n\t\t</li>\n";
        }
        ?>
	
	</ul>
<?php 
    } else {
        echo "\t\t<h3 class=\"empty-list\">There are no documents to edit. <a class=\"short\" href=\"" . get_link("admin/add_document") . "\">Add one if you like</a>.</h3>";
    }
}
Пример #25
0
 protected function get_link_path_internal($top_object)
 {
     if (!is_object($owner)) {
         return array(get_link());
     }
     $link_path = $owner->get_link_path();
     $link_path[] = get_link();
     return $link_path;
 }
Пример #26
0
 public function index()
 {
     $this->lang->load('ae_log', $this->selected_lang);
     $this->data['logs'] = $this->log_manager_model->get_today_logs(2, 30);
     $this->data['lang_pages'] = get_lang_pages(get_link("admin_log", TRUE));
     $this->data['header_title'] = $this->lang->line("log");
     $this->send_admin_output("log");
     return;
 }
Пример #27
0
 public function editpost($id)
 {
     global $lang_common, $lang_prof_reg, $lang_post, $lang_register;
     if ($this->user->g_read_board == '0') {
         message($lang_common['No view'], '403');
     }
     // Fetch some informations about the post, the topic and the forum
     $cur_post = $this->model->get_info_edit($id);
     // Sort out who the moderators are and if we are currently a moderator (or an admin)
     $mods_array = $cur_post['moderators'] != '' ? unserialize($cur_post['moderators']) : array();
     $is_admmod = $this->user->g_id == FEATHER_ADMIN || $this->user->g_moderator == '1' && array_key_exists($this->user->username, $mods_array) ? true : false;
     $can_edit_subject = $id == $cur_post['first_post_id'];
     if ($this->config['o_censoring'] == '1') {
         $cur_post['subject'] = censor_words($cur_post['subject']);
         $cur_post['message'] = censor_words($cur_post['message']);
     }
     // Do we have permission to edit this post?
     if (($this->user->g_edit_posts == '0' || $cur_post['poster_id'] != $this->user->id || $cur_post['closed'] == '1') && !$is_admmod) {
         message($lang_common['No permission'], '403');
     }
     if ($is_admmod && $this->user->g_id != FEATHER_ADMIN && in_array($cur_post['poster_id'], get_admin_ids())) {
         message($lang_common['No permission'], '403');
     }
     // Load the post.php language file
     require FEATHER_ROOT . 'lang/' . $this->user->language . '/post.php';
     // Load the bbeditor.php language file
     require FEATHER_ROOT . 'lang/' . $this->user->language . '/bbeditor.php';
     // Start with a clean slate
     $errors = array();
     if ($this->feather->request()->isPost()) {
         // Let's see if everything went right
         $errors = $this->model->check_errors_before_edit($id, $can_edit_subject, $errors);
         // Setup some variables before post
         $post = $this->model->setup_variables($cur_post, $is_admmod, $can_edit_subject, $errors);
         // Did everything go according to plan?
         if (empty($errors) && !$this->request->post('preview')) {
             // Edit the post
             $this->model->edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod);
             redirect(get_link('post/' . $id . '/#p' . $id), $lang_post['Post redirect']);
         }
     } else {
         $post = '';
     }
     $page_title = array(feather_escape($this->config['o_board_title']), $lang_post['Edit post']);
     $required_fields = array('req_subject' => $lang_common['Subject'], 'req_message' => $lang_common['Message']);
     $focus_element = array('edit', 'req_message');
     define('FEATHER_ACTIVE_PAGE', 'edit');
     $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display();
     if ($this->request->post('preview')) {
         require_once FEATHER_ROOT . 'include/parser.php';
         $preview_message = parse_message($post['message'], $post['hide_smilies']);
     } else {
         $preview_message = '';
     }
     $this->feather->render('edit.php', array('lang_common' => $lang_common, 'cur_post' => $cur_post, 'lang_post' => $lang_post, 'errors' => $errors, 'preview_message' => $preview_message, 'id' => $id, 'feather_config' => $this->config, 'feather_user' => $this->user, 'checkboxes' => $this->model->get_checkboxes($can_edit_subject, $is_admmod, $cur_post, 1), 'feather' => $this->feather, 'can_edit_subject' => $can_edit_subject, 'post' => $post, 'lang_bbeditor' => $lang_bbeditor));
     $this->footer->display();
 }
Пример #28
0
 public function index()
 {
     $this->load->model("module_manager_model");
     $this->lang->load('ae_module', $this->selected_lang);
     $this->data['modules_info'] = $this->module_manager_model->get_all_modules_info($this->selected_lang);
     $this->data['lang_pages'] = get_lang_pages(get_link("admin_module", TRUE));
     $this->data['header_title'] = $this->lang->line("modules");
     $this->send_admin_output("module");
     return;
 }
Пример #29
0
 public function index()
 {
     $this->load->model("hit_counter_model");
     $this->lang->load('ae_hit_counter', $this->selected_lang);
     $this->data['counters_info'] = $this->hit_counter_model->get_all_counts();
     $this->data['lang_pages'] = get_lang_pages(get_link("admin_hit_counter", TRUE));
     $this->data['header_title'] = $this->lang->line("visiting_counter");
     $this->send_admin_output("hit_counter");
     return;
 }
Пример #30
0
function display_page_content()
{
    ?>
	
				
	<div id="edit-header" class="aliasnav">
		<h1>Alias List</h1>
	</div>
	
	<p><strong>An Alias</strong> is a meta-redirect &ndash; one address can forward to another. In the first column are your current redirect addresses, and in the second column is the page/event/blog post/etc... that the alias will redirect to. </p>
	
<?php 
    $alias = Alias::FindAll();
    if (count($alias) > 0) {
        ?>
			
	<div id="table-header" class="alias">
		<strong class="item-link">Alias Link</strong>
		<span class="item-filename">Alias Destination</span>
		<span class="item-viewlink">Test the Alias</span>
	</div>
	
	<ul class="managelist"> 
<?php 
        foreach ($alias as $entry) {
            $slash = "/";
            if (substr($entry->alias, 0, 1) == "/") {
                $slash = "";
            }
            ?>

		<li>
			<a class="item-link" href="<?php 
            echo get_link("/admin/alias_edit/" . $entry->id);
            ?>
"><?php 
            echo SITE_URL . $slash . $entry->alias;
            ?>
</a>
			<span class="item-filename"><?php 
            echo $entry->path;
            ?>
</span>
			<span class="item-viewlink"><a href="<?php 
            echo "http://" . SITE_URL . $slash . $entry->alias;
            ?>
" target="_blank">Open</a></span>
		</li>
<?php 
        }
        echo "</ul>\n";
    } else {
        echo "<h3 class=\"empty-list\">There are no Alias' to edit. <a href=\"" . get_link("admin/alias_add") . "\">Please add one</a>. </h3>";
    }
}