Бесплатная CMS  - Limbo CMS (система управления сайтом)

Материалы сайта


Программный интерфейс Версия для печати
14.02.2005 4007 Опубликовал: Serebro

4 Программный интерфейс

7.1 Admin classes

These classes are utilized when building an administrator interface and this document details some details on how to use them

7.2.1 class_interface.php

This class takes all the variables and generates the user interface ( No HTML is required ) This way preserving the GUI concistency and freeing programmer from designing forms . Given below an example of the class being used to generate the front page module's edit interface

function edit_newsflash($type='edit')
global $conn,$cid;

$rs=$conn->Execute("SELECT id,title,message,access FROM lc_newsflash WHERE id = ".$cid[0]);
$c_info = "Edit Newsflash : You can edit a newsflash over here.";
$t_head = "Edit a Newsflash";
$c_info = "New Newsflash : You can create a new newsflash over here .";
$t_head = "Create New Newsflash";
$c_interface=new interface();
$c_interface->add("com_header","Add / Edit Newsflash");
$c_interface->add("form_textfield","newsflash_title","Title of news",$rsar['title']);
$c_interface->add("form_select","newsflash_access","Access Level:",$access_level);
$c_interface->add("form_textarea","newsflash_message","Complete news",$rsar['message']);



7.2.2 class_toolbar.php

This class is used to build the toolbar which has the button like install , new , edit etc.

The class is already declared as $toolbar so this is how you use it


When you click the form it submits the required form ( usally adminform ) and set variable $task as the value defined in the add .

7.2.3 class_upload.php

This class is used to upload files to specified directories

it is used something like

case "upload" : include($aclasses_dir.'class_upload.php');
Upload :: upload_files($absolute_path."admin/backups/");
case "upload_form" :
Upload :: interface("admin.php?com_option=system&option=manage",$absolute_path."data/backup/");

Switch to English...
BabelFish.AltaVista.com auto-translate
Скачать Limbo