Ejemplo n.º 1
0
 * Registriert werden können die folgenden Variablen:
 * $gp_user['action'] = $gp_action;
 * $gp_user['lang'] = $gp_lang;
 * $gp_user['unique_nr'] = $gp_unique_nr;
 * $gp_user['color_opener'] = $gp_color_opener;
 * $gp_user['image_name'] = $gp_image_name;
 * $gp_user['tpl_set'] = $gp_tpl_set;
 */
while (list($key, $val) = @each($_GET)) {
    $key = substr($key, 3);
    $gp_user[$key] = $val;
}
if ($gp_user['action'] == 'make_image') {
    gb_source_pad::handle_make_image($gp_user['image_name'], $gp_user['tpl_set']);
} else {
    $handle = new gb_source_pad('*handle*');
    header('Content-type: text/html; charset=UTF-8');
    switch ($gp_user['action']) {
        case 'make_js_pad':
            $gp_return = $handle->handle_make_js_pad($gp_user['unique_nr'], $gp_user['tpl_set'], $gp_user['lang']);
            break;
        case 'make_js_functions':
            $gp_return = $handle->handle_make_js_functions($gp_user['tpl_set'], $gp_user['lang']);
            break;
        case 'make_popup_color':
            $gp_return = $handle->handle_make_popup_color($gp_user['color_opener'], $gp_user['unique_nr'], $gp_user['tpl_set'], $gp_user['lang']);
            break;
        case 'make_popup_search':
            $gp_return = $handle->handle_make_popup_search($gp_user['unique_nr'], $gp_user['tpl_set'], $gp_user['lang']);
            break;
        case 'make_popup_search_replace':
Ejemplo n.º 2
0
/**
* Returns complete formatted HTML-textareafield for Sourcecode
* 
* @Args : formname -> name of the inputfield
*         content -> value of textfield
*         type_config -> array with values from the CMS:tag
*         cms_side['view'] -> the current view of the user, 'edit' or 'preview'
*                  ['edit'] -> 'true' if user set the mod in templateconfig as active
*                              if user set inactiv var is not set
* @Return String HTML textareafield
* @Access public 
*/
function type_form_sourcecode($formname, $content, $type_config, $cms_side)
{
    global $js_pad, $cfg_cms, $gb_conf;
    $content = type_form_cmslinks_to_templinks($content);
    include_once $cfg_cms['cms_path'] . 'external/sourcepad/gb_source_pad.php';
    $js_pad = new gb_source_pad('editcontent', $formname);
    $out = "    <td>\n";
    $js_pad->set('handle_http_path', $cfg_cms['cms_html_path'] . 'external/sourcepad/');
    $js_pad->set('language', 'german');
    $js_pad->set('editorheight_css', '350px');
    $js_pad->set('editorwidth_css', '800px');
    $js_pad->set('content', $content);
    $out .= $js_pad->make_pad();
    $out .= "    </td>\n";
    return $out;
}