Beispiel #1
0
<?php

$included = isset($_josh);
if (!$included) {
    include '../include.php';
}
$r = false;
if ($posting) {
    langTranslatePost('title,description,publication');
    $id = db_save("press_clips");
    if (getOption('channels')) {
        db_checkboxes('channels', 'press_clips_to_channels', 'clip_id', 'channel_id', $id);
    }
    url_change_post("/press-clips/clip.php?id=" . $id);
} elseif ($included) {
    $action = getString('add_new');
    $_josh["request"]["path_query"] = "edit.php";
    //shoddy way of setting the form target
    $r["url"] = "http://";
} elseif (url_id()) {
    $action = getString('edit');
    echo drawTop();
    $r = db_grab("SELECT id, title, url, publication, pub_date, description, type_id from press_clips WHERE id = " . $_GET["id"]);
    $r["title"] = format_title($r["title"], "US");
} else {
    $action = getString('add_new');
    echo drawTop();
    if (isset($_GET["title"])) {
        $r["title"] = format_title($_GET["title"], "US");
    }
    if (isset($_GET["url"])) {
Beispiel #2
0
<?php

include "../../include.php";
if ($posting) {
    $id = db_save("web_news_blurbs");
    url_change_post("../");
} elseif (url_action('delete')) {
    db_delete('web_news_blurbs', $_GET['delete_id']);
    url_change('../');
}
echo drawTop();
$f = new form("web_news_blurbs", @$_GET["id"]);
$f->set_title(drawHeader());
echo $f->draw();
echo drawBottom();
Beispiel #3
0
<?php

include '../../include.php';
if ($posting) {
    format_post_bits('is_selected');
    langTranslatePost('name,description');
    $id = db_save('soc_members');
    url_change_post('../');
}
echo drawTop();
$f = new form('soc_members', @$_GET['id'], $page['title']);
$f->set_field(array('name' => 'name' . langExt(), 'type' => 'text', 'label' => getString('title')));
$f->set_field(array('name' => 'country_id', 'type' => 'select', 'sql' => 'SELECT id, en FROM jr_countries ORDER BY en'));
$f->set_field(array('name' => 'description' . langExt(), 'type' => 'textarea', 'class' => 'tinymce', 'label' => getString('description')));
langUnsetFields($f, 'name,description');
langTranslateCheckbox($f);
$f->set_title_prefix($page['breadcrumbs']);
echo $f->draw();
echo drawBottom();
Beispiel #4
0
<?php

$included = isset($_josh);
if (!$included) {
    include '../include.php';
}
$r = array();
if ($posting) {
    langTranslatePost('title,description');
    $id = db_save('external_orgs');
    db_checkboxes('types', 'external_orgs_to_types', 'org_id', 'type_id', $id);
    if (getOption('channels')) {
        db_checkboxes('channels', 'external_orgs_to_channels', 'org_id', 'channel_id', $id);
    }
    url_change_post('./type.php?id=' . db_grab('SELECT type_id FROM external_orgs_to_types WHERE org_id = ' . $id));
    //pure hackery
} elseif ($included) {
    $title = getString('add_new');
    $_josh['referrer'] = false;
    $_josh['request']['path_query'] = 'edit.php';
    //shoddy way of setting the form target
    $r['url'] = 'http://';
} else {
    url_query_require();
    echo drawTop();
    $title = $page['title'];
    $r = db_grab('SELECT id, title, url, description from external_orgs WHERE id = ' . $_GET['id']);
}
if ($included) {
    $_GET['id'] = false;
}