Exemplo n.º 1
0
     showAccessDenied($day, $month, $year, $area, true);
     exit;
 }
 $id = 0;
 if (isset($_GET['id']) && is_numeric($_GET['id'])) {
     $id = (int) $_GET['id'];
 }
 if (isset($_POST['id']) && is_numeric($_POST['id'])) {
     $id = (int) $_POST['id'];
 }
 if ($id <= 0) {
     $editor = new editor('entry_type', $_SERVER['PHP_SELF'] . '?editor=1');
     $editor->setHeading(__('New entrytype'));
     $editor->setSubmitTxt(__('Add'));
 } else {
     $editor = new editor('entry_type', $_SERVER['PHP_SELF'] . '?editor=1', $id);
     $editor->setHeading(__('Change entrytype'));
     $editor->setSubmitTxt(__('Change'));
 }
 $editor->setDBFieldID('entry_type_id');
 $editor->showID(TRUE);
 $editor->makeNewField('entry_type_name', __('Entrytype name'), 'text');
 $editor->makeNewField('entry_type_name_short', __('Short entrytype name'), 'text');
 $editor->makeNewField('resourcenum_length', _h('Length of resource number') . '<br />(' . _h('If zero, resource number will not be required') . ')', 'text');
 $editor->makeNewField('entry_type_inactive', _l('Inactive'), 'select');
 $editor->addChoice('entry_type_inactive', 0, _l('No'));
 $editor->addChoice('entry_type_inactive', 1, _l('Yes'));
 $editor->getDB();
 if (isset($_POST['editor_submit'])) {
     if ($editor->input($_POST)) {
         if ($editor->performDBquery()) {
Exemplo n.º 2
0
/*********************************************************************************************************************************
||																																||
||										AIMSys - Aircraft Inventory & Maintenance System										||
||										Jeremy Bloomstrom																		||
||										Ingenious Design																		||
||										jeremy@in.genio.us																		||
||										March 27, 2013																			||
||																																||
|________________________________________________________________________________________________________________________________|
||																																||
||																																||
||										editor.php																				||
||										VIEW																					||
||																																||
*********************************************************************************************************************************/
// Do Some Logic stuff
$table = req::_('table');
$rowid = req::_('rowid', 'new');
$editing = req::_('editing', false);
$editing = $editing == "false" ? false : $editing;
// Determine if new record or update
$content_header = $rowid != 'new' ? 'View' : 'New';
// Initialize table by getting params and populating with data.
$oEditor = new editor($table, $rowid);
$oEditor->_getData();
$editor_html = $oEditor->_refresh_edit_html();
// Get View
$oView = new view($view);
// Display View Script and View HTML
include_once $oView->_html();
echo document::_addScript($oView->_script());
Exemplo n.º 3
0
$newfield->disabled = false;
$newfield->tooltip = "tooltip";
$newfield->add();
$newfield = new slider();
$newfield->field = "Fslider";
$newfield->label = "Slider";
$newfield->value = array("fr" => "30,100", "en" => "20");
$newfield->defaultValue = "50,90";
$newfield->step = 10;
$newfield->min = 20;
$newfield->max = 300;
$newfield->tooltip = "tooltip";
$newfield->multiLang = true;
$newfield->disabled = false;
$newfield->add();
$newfield = new editor();
$newfield->field = "Feditor";
$newfield->label = "Editor";
$newfield->multiLang = false;
$newfield->widthField = 8;
$newfield->height = 200;
$newfield->value = array("fr" => "FRxxééééxx", "en" => "ENxxxx");
$newfield->defaultValue = "eeeeeeeee";
$newfield->tooltip = "tooltip";
$newfield->toolbar = "Default";
$newfield->startFolder = "test";
$newfield->extensionsAuthorized = "images";
$newfield->variablesAuthorized = true;
$newfield->dimMax = "500x400";
$newfield->dimThumbs = array("100x100", "200x");
$newfield->upload = true;
Exemplo n.º 4
0
 if (isset($_GET['id']) && is_numeric($_GET['id'])) {
     $id = (int) $_GET['id'];
 }
 if (isset($_POST['id']) && is_numeric($_POST['id'])) {
     $id = (int) $_POST['id'];
 }
 if ($id <= 0) {
     $editor = new editor('users', $_SERVER['PHP_SELF'] . '?editor=1');
     $editor->setHeading('Ny bruker');
     $editor->setSubmitTxt(__('Add'));
     if (!$login['user_access_useredit']) {
         showAccessDenied($day, $month, $year, $area, true);
         exit;
     }
 } else {
     $editor = new editor('users', $_SERVER['PHP_SELF'] . '?editor=1', $id);
     $editor->setHeading('Endre bruker');
     $editor->setSubmitTxt(__('Change'));
     if (!$login['user_access_useredit'] && $id != $login['user_id']) {
         showAccessDenied($day, $month, $year, $area, true);
         exit;
     }
 }
 $editor->setDBFieldID('user_id');
 $editor->showID(TRUE);
 // Login name, only for people with access to editing users can change this
 if (!$login['user_access_useredit']) {
     $user_name_short_txt = ', kan ikke endres av deg';
 } else {
     $user_name_short_txt = '';
 }
Exemplo n.º 5
0
/**
* Insert a Wysiwyg editor inside a form instead of a textarea
* A standard textarea is displayed if the Wysiwyg editor is disabled or if
* the user's browser have no activated javascript support
*
* @param string $name content for name attribute in textarea tag
* @param string $content optional content previously inserted into    the    area
* @param int     $rows optional    textarea rows
* @param int    $cols optional    textarea columns
* @param string $optAttrib    optional - additionnal tag attributes
*                                       (wrap, class, ...)
* @return string html output for standard textarea or Wysiwyg editor
*
* @author Hugues Peeters <*****@*****.**>
* @author Sebastien Piraux <*****@*****.**>
*/
function claro_html_textarea_editor($name, $content = '', $rows = 20, $cols = 80, $optAttrib = '', $type = 'advanced')
{
    if (!get_conf('claro_editor')) {
        $claro_editor = 'tiny_mce';
    } else {
        $claro_editor = get_conf('claro_editor');
    }
    $possibleTypeList = array('advanced', 'simple');
    if (!in_array($type, $possibleTypeList)) {
        $type = 'advanced';
    }
    $returnString = '';
    // $claro_editor is the directory name of the editor
    $incPath = get_path('rootSys') . 'claroline/editor/' . $claro_editor;
    $editorPath = get_conf('urlAppend') . '/claroline/editor/';
    $webPath = $editorPath . $claro_editor;
    $isSafariOn_iPhone = preg_match("!Mobile/.*?Safari/.*?!", $_SERVER['HTTP_USER_AGENT']);
    if (!$isSafariOn_iPhone && file_exists($incPath . '/editor.class.php')) {
        // include editor class
        include_once $incPath . '/editor.class.php';
        // editor instance
        $editor = new editor($name, $content, $rows, $cols, $optAttrib, $webPath);
        if ($type == 'advanced') {
            $returnString .= $editor->getAdvancedEditor();
        } else {
            $returnString .= $editor->getSimpleEditor();
        }
    } else {
        // if the editor class doesn't exists we cannot rely on it to display
        // the standard textarea
        $returnString .= '<textarea ' . 'id="' . $name . '" ' . 'name="' . $name . '" ' . 'style="width:100%" ' . 'rows="' . $rows . '" ' . 'cols="' . $cols . '" ' . $optAttrib . ' >' . claro_htmlspecialchars($content) . '</textarea>' . "\n";
    }
    return $returnString;
}
Exemplo n.º 6
0
 function replace_admin_actions()
 {
     global $config, $lang;
     require_once $config['basepath'] . '/include/login.inc.php';
     $login = new login();
     $login_status = $login->loginCheck('Agent');
     if ($login_status !== true) {
         // Run theese commands even if not logged in.
         $data = '';
         switch ($_GET['action']) {
             case 'send_forgot':
                 require_once $config['basepath'] . '/include/login.inc.php';
                 $data = login::forgot_password();
                 break;
             case 'forgot':
                 require_once $config['basepath'] . '/include/login.inc.php';
                 $data = login::forgot_password_reset();
                 break;
             default:
                 $data .= $login_status;
                 break;
         }
     } else {
         switch ($_GET['action']) {
             case 'index':
                 require_once $config['basepath'] . '/include/admin.inc.php';
                 $admin = new general_admin();
                 $data = $admin->index_page();
                 break;
             case 'edit_page':
                 require_once $config['basepath'] . '/include/editor.inc.php';
                 $listing = new editor();
                 $data = $listing->page_edit();
                 break;
             case 'edit_user_images':
                 require_once $config['basepath'] . '/include/images.inc.php';
                 $images = new image_handler();
                 $data = $images->edit_user_images();
                 break;
             case 'edit_listing_images':
                 require_once $config['basepath'] . '/include/images.inc.php';
                 $images = new image_handler();
                 $data = $images->edit_listing_images();
                 break;
             case 'edit_vtour_images':
                 require_once $config['basepath'] . '/include/images.inc.php';
                 $images = new image_handler();
                 $data = $images->edit_vtour_images();
                 break;
             case 'edit_listing_files':
                 require_once $config['basepath'] . '/include/files.inc.php';
                 $files = new file_handler();
                 $data = $files->edit_listing_files();
                 break;
             case 'edit_user_files':
                 require_once $config['basepath'] . '/include/files.inc.php';
                 $files = new file_handler();
                 $data = $files->edit_user_files();
                 break;
             case 'add_listing':
                 require_once $config['basepath'] . '/include/listing_editor.inc.php';
                 $listing_editor = new listing_editor();
                 $data = $listing_editor->add_listing();
                 break;
             case 'edit_my_listings':
                 require_once $config['basepath'] . '/include/listing_editor.inc.php';
                 $listing_editor = new listing_editor();
                 $data = $listing_editor->edit_listings();
                 break;
             case 'edit_listings':
                 require_once $config['basepath'] . '/include/listing_editor.inc.php';
                 $listing_editor = new listing_editor();
                 $data = $listing_editor->edit_listings(false);
                 break;
             case 'configure':
                 require_once $config['basepath'] . '/include/controlpanel.inc.php';
                 $listing_editor = new configurator();
                 $data = $listing_editor->show_configurator();
                 break;
             case 'edit_listing_template':
                 require_once $config['basepath'] . '/include/template_editor.inc.php';
                 $listing = new template_editor();
                 $data = $listing->edit_listing_template();
                 break;
             case 'edit_listings_template_field_order':
                 require_once $config['basepath'] . '/include/template_editor.inc.php';
                 $listing = new template_editor();
                 $data = $listing->edit_listings_template_field_order();
                 break;
             case 'edit_agent_template_field_order':
                 require_once $config['basepath'] . '/include/template_editor.inc.php';
                 $listing = new template_editor();
                 $data = $listing->edit_template_field_order($type = 'agent');
                 break;
             case 'edit_member_template_field_order':
                 require_once $config['basepath'] . '/include/template_editor.inc.php';
                 $listing = new template_editor();
                 $data = $listing->edit_template_field_order($type = 'member');
                 break;
             case 'edit_agent_template_add_field':
                 require_once $config['basepath'] . '/include/template_editor.inc.php';
                 $listing = new template_editor();
                 $data = $listing->add_user_template_field($type = 'agent');
                 break;
             case 'edit_member_template_add_field':
                 require_once $config['basepath'] . '/include/template_editor.inc.php';
                 $listing = new template_editor();
                 $type = 'member';
                 $data = $listing->add_user_template_field($type);
                 break;
             case 'edit_listing_template_search':
                 require_once $config['basepath'] . '/include/template_editor.inc.php';
                 $listing = new template_editor();
                 $data = $listing->edit_listing_template_search();
                 break;
             case 'edit_listing_template_search_results':
                 require_once $config['basepath'] . '/include/template_editor.inc.php';
                 $listing = new template_editor();
                 $data = $listing->edit_listing_template_search_results();
                 break;
             case 'user_manager':
                 require_once $config['basepath'] . '/include/user_manager.inc.php';
                 $user_managment = new user_managment();
                 $data = $user_managment->show_user_manager();
                 break;
             case 'edit_user_template':
                 require_once $config['basepath'] . '/include/template_editor.inc.php';
                 $listing = new template_editor();
                 $data = $listing->edit_user_template();
                 break;
             case 'edit_listing_template_add_field':
                 require_once $config['basepath'] . '/include/template_editor.inc.php';
                 $listing = new template_editor();
                 $data = $listing->add_listing_template_field();
                 break;
             case 'add_page':
                 require_once $config['basepath'] . '/include/editor.inc.php';
                 $listing = new editor();
                 $data = $listing->add_page();
                 break;
             case 'view_log':
                 require_once $config['basepath'] . '/include/log.inc.php';
                 $data = log::view();
                 break;
             case 'clear_log':
                 require_once $config['basepath'] . '/include/log.inc.php';
                 $data = log::clear_log();
                 break;
             case 'show_property_classes':
                 require_once $config['basepath'] . '/include/propertyclass.inc.php';
                 $data = propertyclass::show_classes();
                 break;
             case 'modify_property_class':
                 require_once $config['basepath'] . '/include/propertyclass.inc.php';
                 $data = propertyclass::modify_property_class();
                 break;
             case 'delete_property_class':
                 require_once $config['basepath'] . '/include/propertyclass.inc.php';
                 $data = propertyclass::delete_property_class();
                 break;
             case 'insert_property_class':
                 require_once $config['basepath'] . '/include/propertyclass.inc.php';
                 $data = propertyclass::insert_property_class();
                 break;
             case 'add_listing_property_class':
                 require_once $config['basepath'] . '/include/listing_editor.inc.php';
                 $listing_editor = new listing_editor();
                 $data = $listing_editor->add_listing_logic();
                 break;
                 //Todo Finish Adding Blog Items
             //Todo Finish Adding Blog Items
             case 'edit_blog':
                 require_once $config['basepath'] . '/include/blog_editor.inc.php';
                 $listing = new blog_editor();
                 $data = $listing->blog_edit_index();
                 break;
             case 'edit_blog_post':
                 require_once $config['basepath'] . '/include/blog_editor.inc.php';
                 $listing = new blog_editor();
                 $data = $listing->blog_edit();
                 break;
             case 'add_blog':
                 require_once $config['basepath'] . '/include/blog_editor.inc.php';
                 $listing = new blog_editor();
                 $data = $listing->add_post();
                 break;
             case 'edit_blog_post_comments':
                 require_once $config['basepath'] . '/include/blog_editor.inc.php';
                 $listing = new blog_editor();
                 $data = $listing->edit_post_comments();
                 break;
             case 'addon_manager':
                 require_once $config['basepath'] . '/include/addon_manager.inc.php';
                 $am = new addon_manager();
                 $data = $am->display_addon_manager();
                 break;
             case 'send_notifications':
                 require_once $config['basepath'] . '/include/notification.inc.php';
                 $notify = new notification();
                 $data = $notify->NotifyUsersOfAllNewListings();
                 break;
             default:
                 // Handle Addons
                 $addon_name = array();
                 if (preg_match("/^addon_(.\\S*?)_.*/", $_GET['action'], $addon_name)) {
                     include_once $config['basepath'] . '/addons/' . $addon_name[1] . '/addon.inc.php';
                     $function_name = $addon_name[1] . '_run_action_admin_template';
                     $data = $function_name();
                 }
         }
     }
     return $data;
 }
Exemplo n.º 7
0
$mySelect->fields = "type_texte";
$mySelect->where = "actif=1 AND lg='fr' and id_parent=" . $idParent;
$result = $mySelect->query();
$tab_type_texte = array();
foreach ($result as $row) {
    $tab_type_texte[] = $row["type_texte"];
}
$newfield = new select();
$newfield->field = "type_texte";
$newfield->multiLang = false;
$newfield->label = "Type texte";
$newfield->noneItem = true;
$newfield->items = $tab_type_texte_itineraire;
$newfield->valuesDisabled = $tab_type_texte;
$newfield->add();
$newfield = new editor();
$newfield->field = "texte";
$newfield->label = "Texte";
$newfield->height = 400;
$newfield->multiLang = true;
$newfield->startFolder = "itineraires";
$newfield->variablesAuthorized = true;
$newfield->add();
////////////////////////////////////////////////////////////////
// Action sur la liste ///////////////
if ($__POST["actionInList"] == "delete") {
    // suppression
    foreach ($_POST as $k => $v) {
        if (strpos($k, "deleteMe") === 0) {
            $idDel = substr($k, 8);
            if ((int) $idDel) {
Exemplo n.º 8
0
 * Content Editor 2.0
 * semplice.theme
 * 
 */
// include content class
include 'class.editor.php';
// get content type
$content_type = isset($_POST['content_type']) ? $_POST['content_type'] : '';
// get edit mode
$edit_mode = isset($_POST['edit_mode']) ? $_POST['edit_mode'] : '';
// post id
$post_id = isset($_POST['post_id']) ? $_POST['post_id'] : '';
// is column content?
$is_column_content = isset($_POST['is_column_content']) ? $_POST['is_column_content'] : '';
// content class
$editor = new editor();
// init content
if ($edit_mode === 'new') {
    $editor->rom['content'] = '';
}
// Edit mode
if ($edit_mode === 'edit' || $edit_mode === 'new' || $edit_mode === 'single-edit') {
    // normal values
    $values = array('styles' => isset($editor->rom['styles']) ? $editor->rom['styles'] : '', 'style_class' => 'is-style', 'in_column' => false, 'id' => $editor->id, 'column_id' => $editor->column_id, 'content_type' => $editor->content_type, 'options' => isset($editor->rom['options']) ? $editor->rom['options'] : '', 'options_class' => 'is-option', 'cm_class' => 'is-custom-module');
    if ($is_column_content) {
        $values['styles'] = isset($editor->rom['columns'][$editor->column_id]['#' . $editor->id]['styles']) ? $editor->rom['columns'][$editor->column_id]['#' . $editor->id]['styles'] : '';
        $values['style_class'] = 'is-cc-style';
        $values['in_column'] = true;
        $values['options_class'] = 'is-cc-option';
        $values['options'] = isset($editor->rom['columns'][$editor->column_id]['#' . $editor->id]['options']) ? $editor->rom['columns'][$editor->column_id]['#' . $editor->id]['options'] : '';
        $values['cm_class'] = 'is-cc-custom-module';
Exemplo n.º 9
0
     showAccessDenied($day, $month, $year, $area, true);
     exit;
 }
 $id = 0;
 if (isset($_GET['id']) && is_numeric($_GET['id'])) {
     $id = (int) $_GET['id'];
 }
 if (isset($_POST['id']) && is_numeric($_POST['id'])) {
     $id = (int) $_POST['id'];
 }
 if ($id <= 0) {
     $editor = new editor('entry_type', $_SERVER['PHP_SELF'] . '?editor=1');
     $editor->setHeading(_('New entrytype'));
     $editor->setSubmitTxt(_('Add'));
 } else {
     $editor = new editor('entry_type', $_SERVER['PHP_SELF'] . '?editor=1', $id);
     $editor->setHeading(_('Change entrytype'));
     $editor->setSubmitTxt(_('Change'));
 }
 $editor->setDBFieldID('entry_type_id');
 $editor->showID(TRUE);
 $editor->makeNewField('entry_type_name', _('Entrytype name'), 'text');
 $editor->makeNewField('entry_type_name_short', _('Short entrytype name'), 'text');
 $editor->getDB();
 if (isset($_POST['editor_submit'])) {
     if ($editor->input($_POST)) {
         if ($editor->performDBquery()) {
             // Redirect
             header('Location: admin_entry_type.php');
             exit;
         } else {
Exemplo n.º 10
0
     showAccessDenied($day, $month, $year, $area, true);
     exit;
 }
 $id = 0;
 if (isset($_GET['id']) && is_numeric($_GET['id'])) {
     $id = (int) $_GET['id'];
 }
 if (isset($_POST['id']) && is_numeric($_POST['id'])) {
     $id = (int) $_POST['id'];
 }
 if ($id <= 0) {
     $editor = new editor('programs', $_SERVER['PHP_SELF'] . '?editor=1');
     $editor->setHeading(_('New fixed program'));
     $editor->setSubmitTxt(_('Add'));
 } else {
     $editor = new editor('programs', $_SERVER['PHP_SELF'] . '?editor=1', $id);
     $editor->setHeading(_('Change fixed program'));
     $editor->setSubmitTxt(_('Change'));
 }
 $editor->setDBFieldID('program_id');
 $editor->showID(TRUE);
 $editor->makeNewField('program_name', _('Program name'), 'text');
 $editor->makeNewField('program_desc', 'Beskrivelse', 'textarea');
 $editor->makeNewField('area_id', _('Area belonging'), 'select', array('defaultValue' => $area));
 $Q_area = mysql_query("select id as area_id, area_name from `mrbs_area` order by `area_name`");
 while ($R_area = mysql_fetch_assoc($Q_area)) {
     $editor->addChoice('area_id', $R_area['area_id'], $R_area['area_name']);
 }
 $editor->getDB();
 if (isset($_POST['editor_submit'])) {
     if ($editor->input($_POST)) {
Exemplo n.º 11
0
     showAccessDenied($day, $month, $year, $area, true);
     exit;
 }
 $id = 0;
 if (isset($_GET['id']) && is_numeric($_GET['id'])) {
     $id = (int) $_GET['id'];
 }
 if (isset($_POST['id']) && is_numeric($_POST['id'])) {
     $id = (int) $_POST['id'];
 }
 if ($id <= 0) {
     $editor = new editor('mrbs_area', $_SERVER['PHP_SELF'] . '?editor=1');
     $editor->setHeading(_('New area'));
     $editor->setSubmitTxt(_('Add'));
 } else {
     $editor = new editor('mrbs_area', $_SERVER['PHP_SELF'] . '?editor=1', $id);
     $editor->setHeading(_('Change area'));
     $editor->setSubmitTxt(_('Change'));
 }
 $editor->setDBFieldID('id');
 $editor->showID(TRUE);
 $editor->makeNewField('area_name', _('Area name'), 'text');
 $editor->makeNewField('area_group', 'Standard brukergruppe', 'select');
 $editor->addChoice('area_group', 0, 'Ingen');
 $Q_groups = mysql_query("select group_id, group_name from `groups` order by `group_name`");
 while ($R = mysql_fetch_assoc($Q_groups)) {
     $editor->addChoice('area_group', $R['group_id'], $R['group_name']);
 }
 $editor->getDB();
 if (isset($_POST['editor_submit'])) {
     if ($editor->input($_POST)) {
Exemplo n.º 12
0
     showAccessDenied($day, $month, $year, $area, true);
     exit;
 }
 $id = 0;
 if (isset($_GET['id']) && is_numeric($_GET['id'])) {
     $id = (int) $_GET['id'];
 }
 if (isset($_POST['id']) && is_numeric($_POST['id'])) {
     $id = (int) $_POST['id'];
 }
 if ($id <= 0) {
     $editor = new editor('products', $_SERVER['PHP_SELF'] . '?editor=1');
     $editor->setHeading('Nytt produkt');
     $editor->setSubmitTxt(__('Add'));
 } else {
     $editor = new editor('products', $_SERVER['PHP_SELF'] . '?editor=1', $id);
     $editor->setHeading('Endre produkt');
     $editor->setSubmitTxt(__('Change'));
 }
 $editor->setDBFieldID('product_id');
 $editor->showID(TRUE);
 $editor->makeNewField('product_name', 'Produktnavn', 'text');
 $editor->makeNewField('product_price', 'Pris', 'text');
 $editor->makeNewField('product_tax', 'MVA %', 'text');
 $editor->makeNewField('product_desc', 'Beskrivelse', 'textarea');
 $editor->makeNewField('area_id', __('Area belonging'), 'select', array('defaultValue' => $area));
 $Q_area = mysql_query("select id as area_id, area_name from `mrbs_area` order by `area_name`");
 $editor->addChoice('area_id', 0, 'Alle anlegg');
 while ($R_area = mysql_fetch_assoc($Q_area)) {
     $editor->addChoice('area_id', $R_area['area_id'], $R_area['area_name']);
 }
if ($redirect1 != '') {
    $redirecting = '?redirect1=' . $redirect1;
    if ($redirect2 != '') {
        $redirecting .= '&amp;redirect2=' . $redirect2;
    }
    if ($redirect3 != '') {
        $redirecting .= '&amp;redirect3=' . $redirect3;
    }
}
if ($id <= 0) {
    $editor = new editor('skjermer', $_SERVER['PHP_SELF'] . $redirecting);
    $editor->setHeading('Opprett skjerm');
    $editor->setSubmitTxt('Opprett');
    $smarty->assign('tittel2', 'Opprett skjerm');
} else {
    $editor = new editor('skjermer', $_SERVER['PHP_SELF'] . $redirecting, $id);
    $editor->setHeading('Endre skjerm');
    $editor->setSubmitTxt('Endre');
    $smarty->assign('tittel2', 'Endre skjerm');
}
$editor->setDBFieldID('skjerm_id');
$editor->showID(TRUE);
## SKJERM_NAVN
$editor->makeNewField('skjerm_navn', 'Navn på skjerm', 'text');
## SKJERM_SLIDE_NR
$editor->makeNewField('skjerm_slidenr', 'Antall slides', 'text');
## SKJERM_DEFAULTSLIDE_HEADING
$editor->makeNewField('skjerm_defaultslide_heading', 'Overskrift på skjerm', 'text');
$editor->vars['skjerm_defaultslide_heading']['desc'] = 'Sett inn &lt;br&gt; for linjeskift (andre HTML-tags er også gyldige).';
## SKJERM_DEFAULTSLIDE
$editor->makeNewField('skjerm_defaultslide', 'Innhold', 'textarea', array('rows' => 30, 'cols' => 135));
Exemplo n.º 14
0
 *  Last Updated: 	8/21/2014
 *  
 *  Changelog:
 *   8/21/2014 - Added comment header
 */
/**  **  **  **  **  **  **  **  **  **
 *   SETUP PARAMETERS
 */
global $view;
global $option;
$option = req::_('option', 'default');
$view = req::_('view', $option);
/**  **  **  **  **  **  **  **  **  **
 *   PROCESS THE REQUEST
 */
switch ($option) {
    case 'update_options':
        $table = req::_('table');
        $col = req::_('col');
        $val = req::_('value');
        $oParams = new colparams($table, $col);
        $params = $oParams->_getvalues();
        $return = editor::_getOptions($params, $val);
        echo $return;
        break;
}
?>



Exemplo n.º 15
0
/*********************************************************************************************************************************
||																																||
||										AIMSys - Aircraft Inventory & Maintenance System										||
||										Jeremy Bloomstrom																		||
||										Ingenious Design																		||
||										jeremy@in.genio.us																		||
||										March 27, 2013																			||
||																																||
|________________________________________________________________________________________________________________________________|
||																																||
||																																||
||										popup.php																				||
||										VIEW																					||
||																																||
*********************************************************************************************************************************/
// Do Some Logic stuff
$table = req::_('table');
$rowid = req::_('rowid', 'new');
$editing = true;
// Initialize table by getting params and populating with data.
$oEditor = new editor($table, $rowid);
$oEditor->_getData();
$editor_html = $oEditor->_html();
// Get View
$oView = new view($view);
// Display View Script and View HTML
echo document::_addScript($oView->_script());
echo document::_addScript("ready.js");
include_once $oView->_html();
echo '<div class="clear"></div>';
//pre($data);
Exemplo n.º 16
0
 function add_page()
 {
     global $conn, $lang, $config;
     $security = login::loginCheck('editpages', true);
     $display = '';
     if ($security === true) {
         require_once $config['basepath'] . '/include/misc.inc.php';
         $misc = new misc();
         // Do we need to save?
         if (isset($_POST['edit'])) {
             // Save page now
             $save_full = $_POST['ta'];
             $save_title = $misc->make_db_safe($_POST['title']);
             $save_description = $misc->make_db_safe($_POST['description']);
             $save_keywords = $misc->make_db_safe($_POST['keywords']);
             // $save_full_xhtml = urldecode($save_full);
             // $save_full_xhtml = $this->html2xhtml($save_full_xhtml);
             $save_full_xhtml = $misc->make_db_safe(editor::htmlEncodeText($save_full), TRUE);
             $sql = "INSERT INTO " . $config['table_prefix'] . "pagesmain (pagesmain_full,pagesmain_title,pagesmain_date,pagesmain_summary,pagesmain_no_visitors,pagesmain_complete,pagesmain_description,pagesmain_keywords) VALUES ({$save_full_xhtml},{$save_title}," . $conn->DBDate(time()) . ",'',0,1,{$save_description},{$save_keywords})";
             $recordSet = $conn->Execute($sql);
             if (!$recordSet) {
                 $misc->log_error($sql);
             }
             $display .= "<center><b>{$lang['page_saved']}</b></center><br />";
             $display .= $this->page_list();
             $display .= '<form action="index.php?action=edit_page" method="post" id="edit" name="edit">';
             $html = '';
             $sql = "SELECT pagesmain_full, pagesmain_title, pagesmain_complete, pagesmain_id, pagesmain_description, pagesmain_keywords  FROM " . $config['table_prefix'] . "pagesmain WHERE pagesmain_title = " . $save_title;
             $recordSet = $conn->Execute($sql);
             if (!$recordSet) {
                 $misc->log_error($sql);
             }
             // Save PageID to Session for Image Upload Plugin
             $_SESSION['PageID'] = $recordSet->fields['pagesmain_id'];
             // Pull the page from the database
             $display .= "<input type=\"hidden\" name=\"edit\" value=\"yes\" />";
             $display .= "<input type=\"hidden\" name=\"PageID\" value=\"" . $_SESSION['PageID'] . "\" />";
             $html = $misc->make_db_unsafe($recordSet->fields['pagesmain_full']);
             $title = $misc->make_db_unsafe($recordSet->fields['pagesmain_title']);
             $description = $misc->make_db_unsafe($recordSet->fields['pagesmain_description']);
             $keywords = $misc->make_db_unsafe($recordSet->fields['pagesmain_keywords']);
             // $complete = $misc->make_db_unsafe($recordSet->fields['pagesmain_complete']);
             $display .= $lang['title'] . ' <input type="text" name="title" value="' . $title . '" /><br /><br />';
             $display .= $lang['page_meta_description'] . ' <input type="text" size="50" name="description" value="' . $description . '" /><br /><br />';
             $display .= $lang['page_meta_keywords'] . ' <input type="text" size="50" name="keywords" value="' . $keywords . '" /><br /><br />';
             $display .= '<textarea name="ta" id="ta" style="height: 350px; width: 100%;">' . $html . '</textarea>';
             $display .= '<input type="submit" name="ok" value="' . $lang['submit'] . '"  style="margin-top:3px;"/>';
             $display .= '</form>';
             if ($_SESSION['PageID'] != '') {
                 $display .= '<form action="index.php?action=edit_page" method="post" id="delete" style="margin-top:3px;">';
                 $display .= '<input type="hidden" name="delete" value="yes" />';
                 $display .= '<input type="hidden" name="PageID" value="' . $_SESSION['PageID'] . '" />';
                 $display .= '<input type="submit" name="ok" value="' . $lang['delete_page'] . '" />';
                 $display .= '</form>';
             }
         } else {
             $display .= $this->page_list();
             $display .= '<form action="index.php?action=add_page" method="post" id="edit" name="edit">';
             $display .= "<input type=\"hidden\" name=\"edit\" value=\"yes\" />";
             $display .= $lang['title'] . ' <input type="text" name="title" value="" /><br /><br />';
             $display .= $lang['page_meta_description'] . ' <input type="text" size="50" name="description" value="" /><br /><br />';
             $display .= $lang['page_meta_keywords'] . ' <input type="text" size="50" name="keywords" value="" /><br /><br />';
             $display .= '<textarea name="ta" id="ta" style="height: 30em; width: 100%;"></textarea>';
             $display .= '<input type="submit" name="ok" value="' . $lang['submit'] . '" style="margin-top:3px;" />';
             $display .= '</form>';
         }
     } else {
         $display .= '<div class="error_text">' . $lang['access_denied'] . '</div>';
     }
     return $display;
 }
Exemplo n.º 17
0
        ?>
          <tr valign="top">
            <td class="main" width="250"><?php 
        if ($i == 0) {
            echo TEXT_AUTHORS_DESCRIPTION;
        }
        ?>
</td>
            <td class="main"><?php 
        echo tep_image(DIR_WS_CATALOG_IMAGES . $languages[$i]['image'], $languages[$i]['name'], '', '', 'style="float: left; margin: 4px 4px 0px 0px;"');
        $field_value = isset($authors_description[$languages[$i]['id']]) ? $authors_description[$languages[$i]['id']] : tep_get_author_info($aInfo->authors_id, $languages[$i]['id'], 'authors_description');
        $field_value = str_replace('\\\\"', '"', $field_value);
        $field_value = str_replace('\\"', '"', $field_value);
        $field_value = str_replace("\\\\'", "\\'", $field_value);
        $field_value = str_replace('="/', '="' . HTTP_SERVER . '/', $field_value);
        $editor = new editor('authors_description[' . $languages[$i]['id'] . ']');
        $editor->Value = $field_value;
        $editor->Height = '280';
        $editor->Create();
        ?>
</td>
          </tr>
<?php 
    }
    ?>
          <tr>
            <td colspan="2"><?php 
    echo tep_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
          </tr>
Exemplo n.º 18
0
     showAccessDenied($day, $month, $year, $area, true);
     exit;
 }
 $id = 0;
 if (isset($_GET['id']) && is_numeric($_GET['id'])) {
     $id = (int) $_GET['id'];
 }
 if (isset($_POST['id']) && is_numeric($_POST['id'])) {
     $id = (int) $_POST['id'];
 }
 if ($id <= 0) {
     $editor = new editor('mrbs_area', $_SERVER['PHP_SELF'] . '?editor=1');
     $editor->setHeading(__('New area'));
     $editor->setSubmitTxt(__('Add'));
 } else {
     $editor = new editor('mrbs_area', $_SERVER['PHP_SELF'] . '?editor=1', $id);
     $editor->setHeading(__('Change area'));
     $editor->setSubmitTxt(__('Change'));
 }
 $editor->setDBFieldID('id');
 $editor->showID(TRUE);
 $editor->makeNewField('area_name', __('Area name'), 'text');
 $editor->makeNewField('area_group', 'Standard brukergruppe', 'select');
 $editor->addChoice('area_group', 0, 'Ingen');
 $Q_groups = mysql_query("select group_id, group_name from `groups` order by `group_name`");
 while ($R = mysql_fetch_assoc($Q_groups)) {
     $editor->addChoice('area_group', $R['group_id'], $R['group_name']);
 }
 $editor->makeNewField('importdatanova_shop_id', _h('Datanova import') . ' - ' . _h('Shop id'), 'text');
 $editor->makeNewField('importdatanova_alert_email', _h('Datanova import') . ' - ' . _h('Alert email(s)') . '*', 'text');
 $editor->getDB();
Exemplo n.º 19
0
 *   PROCESS FORM
 */
switch ($frm_name) {
    case 'frm_tableparam':
        $oParams = new colparams(req::_('_table'), req::_('_col'));
        $oParams->_set($_POST);
        $output = $oParams->_store();
        break;
    case 'frm_editor':
        $table = req::_('table_name');
        // table name
        $prikey = dbfn::_getprimary($table);
        // get primary key name of table
        $id = req::_($prikey);
        // get id of record
        $oEditor = new editor($table, $id);
        $oEditor->_getData();
        $oEditor->_setData($_POST);
        $output = $oEditor->_storeData();
        break;
    case 'frm_storetabs':
        $tabs = req::_('Tabs', '');
        $oResult = aimsys::_storeTabs($tabs);
        $output = $oResult->ret;
        break;
    case 'frm_gettabs':
        $t = aimsys::_getTabs();
        break;
}
/**  **  **  **  **  **  **  **  **  **
 *   OUTPUT THE RESULTS
Exemplo n.º 20
0
     showAccessDenied($day, $month, $year, $area, true);
     exit;
 }
 $id = 0;
 if (isset($_GET['id']) && is_numeric($_GET['id'])) {
     $id = (int) $_GET['id'];
 }
 if (isset($_POST['id']) && is_numeric($_POST['id'])) {
     $id = (int) $_POST['id'];
 }
 if ($id <= 0) {
     $editor = new editor('mrbs_room', $_SERVER['PHP_SELF'] . '?area_id=' . $area['area_id'] . '&amp;editor=1');
     $editor->setHeading(_('New room for') . ' ' . $area['area_name']);
     $editor->setSubmitTxt(_('Add'));
 } else {
     $editor = new editor('mrbs_room', $_SERVER['PHP_SELF'] . '?area_id=' . $area['area_id'] . '&amp;editor=1', $id);
     $editor->setHeading(_('Change room'));
     $editor->setSubmitTxt(_('Change'));
 }
 $editor->setDBFieldID('id');
 $editor->showID(TRUE);
 $editor->makeNewField('room_name', _('Area name'), 'text');
 $editor->makeNewField('area_id', _('Area belonging'), 'select', array('defaultValue' => $area['area_id']));
 $Q_area = mysql_query("select id as area_id, area_name from `mrbs_area` order by `area_name`");
 while ($R_area = mysql_fetch_assoc($Q_area)) {
     $editor->addChoice('area_id', $R_area['area_id'], $R_area['area_name']);
 }
 $editor->getDB();
 if (isset($_POST['editor_submit'])) {
     if ($editor->input($_POST)) {
         if ($editor->performDBquery()) {
Exemplo n.º 21
0
 function renderElement()
 {
     if ($this->wysiwyg) {
         $claro_editor = get_conf('claro_editor', 'tiny_mce');
         // $claro_editor is the directory name of the editor
         $incPath = get_path('rootSys') . 'claroline/editor/' . $claro_editor;
         $editorPath = get_path('url') . '/claroline/editor/';
         $webPath = $editorPath . $claro_editor;
         if (file_exists($incPath . '/editor.class.php')) {
             // include editor class
             include_once $incPath . '/editor.class.php';
             // editor instance
             // TODO fix option list
             $editor = new editor($this->name, $this->value, $this->rows, $this->cols, renderParams($this->optionList), $webPath);
             $html = $editor->getAdvancedEditor();
         } else {
             // force display of textarea as it will not be possible to display it in wysiwyg mode
             $this->useWysiwyg(false);
         }
     }
     if (!$this->wysiwyg) {
         $html = '<textarea' . ' id="form_' . $this->id . '"' . ' name="' . $this->name . '"' . ' ' . renderParams($this->optionList) . ' >' . claro_htmlspecialchars($this->value) . "\n" . '</textarea>' . "\n";
     }
     return $html;
 }
Exemplo n.º 22
0
     $redirect2 = '';
     $redirect_fil = $_SERVER['PHP_SELF'];
 }
 $id = 0;
 if (isset($_GET['id']) && is_numeric($_GET['id'])) {
     $id = slashes(htmlspecialchars($_GET['id'], ENT_QUOTES));
 }
 if (isset($_POST['id']) && is_numeric($_POST['id'])) {
     $id = slashes(htmlspecialchars($_POST['id'], ENT_QUOTES));
 }
 if ($id <= 0) {
     $editor = new editor('import_dn_vareregister', $_SERVER['PHP_SELF'] . '?area_id=' . $area['area_id'] . '&amp;action=editor_varereg' . $redirect2);
     $editor->setHeading('Ny vare for ' . $area['area_name']);
     $editor->setSubmitTxt(__('Add'));
 } else {
     $editor = new editor('import_dn_vareregister', $_SERVER['PHP_SELF'] . '?area_id=' . $area['area_id'] . '&amp;action=editor_varereg&amp;id=' . $id . $redirect2, array('vare_nr' => $id, 'area_id' => $area['area_id']));
     $editor->setHeading('Endre vare for ' . $area['area_name']);
     $editor->setSubmitTxt(__('Change'));
 }
 $editor->setDBFieldID(array('vare_nr', 'area_id'));
 $editor->showID(TRUE);
 if (isset($_GET['vare_nr'])) {
     $vare_nr = slashes(htmlspecialchars($_GET['vare_nr'], ENT_QUOTES));
 } else {
     $vare_nr = '';
 }
 if (isset($_GET['vare_navn'])) {
     $vare_navn = slashes(htmlspecialchars($_GET['vare_navn'], ENT_QUOTES));
 } else {
     $vare_navn = '';
 }