<?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"])) {
<?php include "../../include.php"; if ($posting) { langTranslatePost('title'); $id = db_save('organizations'); url_drop('id'); } elseif (url_action('delete') && url_id('delete_id')) { db_delete('organizations', $_GET['delete_id']); url_drop('delete_id,action'); } echo drawTop(); if (url_id()) { //form $f = new form('organizations', @$_GET['id']); $f->set_field(array('type' => 'text', 'name' => 'title' . langExt(), 'label' => getString('title'))); langUnsetFields($f, 'title'); langTranslateCheckbox($f); echo $f->draw(); } else { //modules list $t = new table('organizations', drawHeader()); $t->set_column('draggy', 'd', ' '); $t->set_column('title', 'l', getString('title')); $t->set_column('delete', 'd', ' '); $result = db_table('SELECT id, title' . langExt() . ' title FROM organizations WHERE is_active = 1 ORDER BY precedence'); foreach ($result as &$r) { $r['draggy'] = draw_img('/images/icons/move.png'); $r['title'] = draw_link('organizations.php?id=' . $r['id'], $r['title']); $r['delete'] = drawColumnDelete($r['id']); }
<?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();
<?php include "include.php"; if ($posting) { langTranslatePost('title,description'); $id = db_save('cal_events'); if (getOption('channels')) { db_checkboxes('channels', 'cal_events_to_channels', 'event_id', 'channel_id', $id); } url_query_add(array("month" => $_POST['start_dateMonth'], "year" => $_POST['start_dateYear'])); } if (!isset($_GET['month']) || !isset($_GET['year'])) { url_query_add(array("month" => $_josh['month'], "year" => $_josh['year'])); } echo drawTop(); echo drawNavigationCal($_GET['month'], $_GET['year']); //get events $result = db_query('SELECT e.id, DAY(e.start_date) startDay, e.title' . langExt() . ' title, t.color FROM cal_events e JOIN cal_events_types t ON e.type_id = t.id ' . getChannelsWhere('cal_events', 'e', 'event_id') . ' AND MONTH(e.start_date) = ' . $_GET['month'] . ' AND YEAR(e.start_date) = ' . $_GET['year']); while ($r = db_fetch($result)) { $events[$r['startDay']][$r['id']]['title'] = $r['title']; $events[$r['startDay']][$r['id']]['color'] = $r['color'];
<?php include "include.php"; url_query_require(); if ($posting) { $_POST['translations_do'] = true; langTranslatePost('description'); $_POST["topic_id"] = $_GET["id"]; $id = db_save("bb_followups", false); db_query('UPDATE bb_topics SET thread_date = GETDATE(), replies = (SELECT COUNT(*) FROM bb_followups WHERE topic_id = ' . $_POST['topic_id'] . ') WHERE id = ' . $_POST['topic_id']); //send followup email to all topic contributors if (getOption("bb_notifyfollowup")) { $addresses = array(); $languages = db_array('SELECT code FROM languages'); foreach ($languages as $l) { $addresses[$l] = array(); } //get topic poster email, put in correct bucket $poster = db_grab("SELECT \n\t\t\t\tu.email, \n\t\t\t\tl.code \n\t\t\tFROM bb_topics t \n\t\t\tJOIN users u ON t.created_user = u.id \n\t\t\tJOIN languages l ON u.language_id = l.id\n\t\t\tWHERE u.is_active = 1 AND t.id = " . $_POST["topic_id"]); $addresses[$poster['code']][] = $poster['email']; //get followup poster emails $repliers = db_table("SELECT \n\t\t\t\tu.email,\n\t\t\t\tl.code\n\t\t\tFROM bb_followups f \n\t\t\tJOIN users u ON u.id = f.created_user \n\t\t\tJOIN languages l ON u.language_id = l.id\n\t\t\tWHERE u.is_active = 1 AND f.is_active = 1 AND f.topic_id = " . $_POST["topic_id"]); foreach ($repliers as $r) { $addresses[$r['code']][] = $r['email']; } foreach ($addresses as $lang => $emails) { $topic = db_grab('SELECT t.title' . langExt($lang) . ' title, y.title' . langExt($lang) . ' type, t.created_date FROM bb_topics t
<?php include '../include.php'; if ($posting) { //debug(); //check to make sure email not already assigned to an active user if (!$editing && ($id = db_grab('SELECT id FROM users WHERE is_active = 1 AND email = "' . $_POST['email'] . '"'))) { url_change('view.php?id=' . $id); } langTranslatePost('bio,title'); if (!getOption('languages')) { $_POST['language_id'] = 1; } if ($uploading) { $_POST['image_large'] = format_image_resize(file_get_uploaded('image_large'), 240); $_POST['image_medium'] = format_image_resize($_POST['image_large'], 135); $_POST['image_small'] = format_image_resize($_POST['image_large'], 50); } //check for long distance codes if (getOption('staff_ldcode')) { if ($_POST['officeID'] == 1) { if (!url_id() || !db_grab('SELECT longDistanceCode FROM users WHERE id = ' . url_id())) { //user doesn't have a long distance code but needs one if (!($code = db_grab('SELECT l.code FROM ldcodes l WHERE (SELECT COUNT(*) FROM users u WHERE u.longDistanceCode = l.code AND u.is_active = 1) = 0'))) { error_hande('out of codes', 'the intranet is out of long distance codes to assign to new users, such as for ' . $_POST['firstname'] . ' ' . $_POST['lastname']); } else { $_POST['longDistanceCode'] = $code; } } } }
<?php include '../../../include.php'; if ($posting) { langTranslatePost('content'); $id = db_save('guide', 1); url_change('../'); } echo drawTop(); $f = new form('guide', 1); langUnsetFields($f, 'content'); langTranslateCheckbox($f, true); echo $f->draw(); echo drawBottom();