예제 #1
0
function bbDrawTable($limit = false, $where = false, $title = false)
{
    //only show add new on main page
    $options = !$limit ? false : array('#bottom' => getString('add_new'));
    $t = new table('bb_topics', drawHeader($options, $title));
    $t->set_column('topic', 'l', getString('topic'));
    $t->set_column('starter', 'l', getString('starter'), 120);
    $t->set_column('replies', 'c', getString('replies'), 30);
    $t->set_column('last_post', 'r', getString('last_post'), 100);
    $result = bbGetTopics($where, $limit);
    foreach ($result as &$r) {
        array_argument($r, 'thread');
        if ($r['is_admin']) {
            array_argument($r, 'admin');
        }
        $r['link'] = 'topic.php?id=' . $r['id'];
        if (empty($r['topic'])) {
            $r['topic'] = '<i>no topic entered</i>';
        }
        $r['topic'] = draw_link($r['link'], $r['topic']);
        $r['starter'] = $r['firstname'] . ' ' . $r['lastname'];
        $r['last_post'] = format_date($r['last_post']);
    }
    return $t->draw($result, getString('topics_empty'));
}
예제 #2
0
function drawEventForm()
{
    global $page;
    $f = new form('cal_events', @$_GET['id'], $page['title']);
    if (url_id()) {
        $f->set_title_prefix(drawHeader(false, ' '));
    }
    if ($page['is_admin']) {
        $f->set_field(array('name' => 'created_user', 'class' => 'admin', 'type' => 'select', 'sql' => 'SELECT id, CONCAT_WS(", ", lastname, firstname) FROM users WHERE is_active = 1 ORDER BY lastname, firstname', 'default' => $_SESSION['user_id'], 'required' => true, 'label' => getString('posted_by')));
    }
    $f->set_field(array('name' => 'title' . langExt(), 'label' => getString('title'), 'type' => 'text'));
    $f->set_field(array('name' => 'start_date', 'label' => getString('start_date'), 'type' => 'datetime', 'required' => true));
    $f->set_field(array('name' => 'end_date', 'label' => getString('end_date'), 'type' => 'datetime', 'required' => true));
    $f->set_field(array('name' => 'type_id', 'type' => 'select', 'sql' => 'SELECT id, description' . langExt() . ' FROM cal_events_types ORDER BY description', 'label' => getString('category'), 'required' => 'true'));
    $f->set_field(array('name' => 'description' . langExt(), 'label' => getString('description'), 'type' => 'textarea', 'class' => 'tinymce'));
    langUnsetFields($f, 'title,description');
    formAddChannels($f, 'cal_events', 'event_id');
    $f->set_order('created_user,title, start_date, end_date, type_id, description, channels');
    langTranslateCheckbox($f, url_id());
    return $f->draw(false, false);
}
예제 #3
0
파일: index.php 프로젝트: Rhenan/intranet-1
<?php

include '../../include.php';
echo drawtop();
$t = new table('ldcodes', drawHeader(false, 'Long Distance Codes'));
$t->set_column('code', 'c', 'Code');
$t->set_column('user', 'l', 'User');
$result = db_table('SELECT l.code, (SELECT CONCAT_WS(",", u.lastname, u.firstname, u.id) FROM users u WHERE u.longDistanceCode = l.code AND u.is_active = 1) user FROM ldcodes l ORDER BY user');
foreach ($result as &$r) {
    if ($r['user']) {
        $r['group'] = 'Assigned';
        list($lastname, $firstname, $id) = explode(',', $r['user']);
        $r['user'] = draw_link('/staff/view.php?id=' . $id, $lastname . ', ' . $firstname);
    } else {
        $r['group'] = 'Unassigned Codes';
    }
}
echo $t->draw($result, 'There are no long distance codes');
echo drawBottom();
예제 #4
0
            ?>
'><?php 
        } else {
            ?>
<b><?php 
        }
        echo format_string($o['title'], 26);
        ?>
</b></a></td>
		<?php 
    }
    ?>
	</tr>
</table>
<?php 
} else {
    echo drawPanel(draw_form_select('foo', $orgs, url_id(), false, false, 'location.href=\'' . $request['path'] . '?id=\' + this.value'));
}
if (url_id()) {
    $where = $_GET['id'] == 0 ? ' IS NULL ' : ' = ' . $_GET['id'];
    $links = $page['is_admin'] ? array('add_edit.php' => getString('add_new')) : false;
    echo drawStaffList('u.is_active = 1 AND u.organization_id ' . $where, 'This organization has no staff associated with it.', $links, draw_link($request['path_query'], $page['title']) . ' &gt; ' . db_grab('SELECT title FROM organizations WHERE id = ' . $_GET['id']));
} else {
    $t = new table('foo', drawHeader());
    $t->set_column('title', false, getString('title'));
    foreach ($orgs as &$o) {
        $o['title'] = draw_link('organizations.php?id=' . $o['id'], $o['title']);
    }
    echo $t->draw($orgs);
}
echo drawBottom();
예제 #5
0
파일: index.php 프로젝트: Rhenan/intranet-1
			<?php 
        }
        ?>
		</td>
	</tr>
	<?php 
    }
    ?>
	
</table>
<?php 
} else {
    //main table
    $result = db_table('SELECT 
		e.id, e.title' . langExt() . ' title, t.title' . langExt() . ' "group", e2t.type_id
		FROM external_orgs e
		JOIN external_orgs_to_types e2t ON e.id = e2t.org_id
		JOIN external_orgs_types t ON e2t.type_id = t.id
		WHERE e.is_active = 1 ORDER BY t.title, e.title
		');
    $t = new table('external_orgs_types', drawHeader(array('#bottom' => getString('add_new'))));
    $t->set_column('title', 'l', getString('title'));
    foreach ($result as &$r) {
        $r['group'] = draw_link('./type.php?id=' . $r['type_id'], $r['group']);
        $r['title'] = draw_link('./?id=' . $r['id'], $r['title']);
    }
    echo $t->draw($result, 'There are no external orgs added yet.');
    //add new
    include 'edit.php';
}
echo drawBottom();
예제 #6
0
파일: index.php 프로젝트: Rhenan/intranet-1
<?php

include "../../include.php";
echo drawTop();
$blurbs = db_table("SELECT \n\t\tr.id,\n\t\tr.title,\n\t\tt.icon,\n\t\tISNULL(r.updated_date, r.created_date) updated\n\t\tFROM employer_strategy_resources r\n\t\tJOIN docs_types t ON r.type_id = t.id\n\t\tWHERE r.is_active = 1\n\t\tORDER BY updated DESC", 20);
$t = new table("web_news_blurbs");
$t->set_column("icon");
$t->set_column("title");
$t->set_column("updated", "r");
$t->set_title(drawHeader(array("add new" => "edit/")));
foreach ($blurbs as &$b) {
    $b["icon"] = draw_img($b["icon"]);
    $b["title"] = draw_link("edit/?id=" . $b["id"], $b["title"]);
    $b["updated"] = format_date($b["updated"]);
}
echo $t->draw($blurbs);
echo drawBottom();
예제 #7
0
<?php

require '../Core/SCV2_Core.php';
init_SCV2();
if (xsrf_guard()) {
    if ($_POST['btnCancel']) {
        header("location: " . HOME_PAGE);
        exit;
    }
}
$mysqli = connect_DB();
$mysqli->real_query("SELECT Table_ID, Table_Name, Remarks FROM `table` WHERE `Project_ID`='{$_SESSION['Project_ID']}' ORDER BY `Table_Name`");
drawHeader();
drawPageTitle('List View: Tables', $errMsg);
?>
<fieldset class="container">
<?php 
drawButton('CANCEL');
?>
<a class='blue' href='CreateTables.php'>Create New Table</a> :: <a class=blue href=Import_Tables.php>Import Tables</a>
<table border=1 width=100% class="listView">
<tr class="listRowHead">
    <td width="140">Operations</td>
    <td>Table Name</td>
    <td>Remarks</td>
</tr>
<?php 
if ($result = $mysqli->use_result()) {
    $a = 0;
    $class = '';
    while ($row = $result->fetch_assoc()) {
예제 #8
0
파일: index.php 프로젝트: Rhenan/intranet-1
if ($posting) {
    langTranslatePost('title');
    $id = db_save('modules');
    url_drop('id');
}
echo drawTop();
if (url_id()) {
    //form
    $f = new form('modules', @$_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('modules', drawHeader());
    $t->set_column('is_selected', 'd', '&nbsp;');
    $t->set_column('draggy', 'd', '&nbsp;');
    $t->set_column('title', 'l', getString('title'));
    $t->set_column('pages', 'r');
    $result = db_table('SELECT m.id, m.title' . langExt() . ' title, m.is_active, (SELECT COUNT(*) FROM pages p WHERE p.module_id = m.id AND p.modulette_id IS NULL) pages FROM modules m ORDER BY m.precedence');
    $t->set_draggable('draggy');
    foreach ($result as &$r) {
        $r['is_selected'] = draw_form_checkbox('foo', $r['is_active'], false, 'ajax_set(\'modules\', \'is_active\', ' . $r['id'] . ', ' . abs($r['is_active'] - 1) . ');');
        $r['draggy'] = draw_img('/images/icons/move.png');
        $r['title'] = draw_link('./?id=' . $r['id'], $r['title']);
        $r['pages'] = draw_link('pages.php?module_id=' . $r['id'], format_quantitize($r['pages'], 'page'));
    }
    echo $t->draw($result, 'No modules');
}
echo drawBottom();
예제 #9
0
function drawStaffList($where, $errmsg = false, $options = false, $listtitle = false, $searchterms = false)
{
    global $page, $_josh;
    if (!$errmsg) {
        $errmsg = getString('results_empty');
    }
    //only show delete for admins on pages that aren't the chagnes page
    $showDelete = $page['is_admin'] && $page['id'] != 35;
    $t = new table('staff', drawHeader($options, $listtitle));
    $t->set_column('pic', 'c', '&nbsp;', 50);
    $t->set_column('name', 'l', getString('name') . (getOption('staff_showoffice') ? ' / ' . getString('location') : ''));
    $t->set_column('title', 'l', getString('staff_title') . ' / ' . (getOption('staff_showdept') ? getString('department') : getString('organization')), 222);
    $t->set_column('phone', 'l', getString('telephone'));
    if ($showDelete) {
        $t->set_column('del', 'c', '&nbsp;', 16);
    }
    $result = db_table('SELECT DISTINCT
							u.id, 
							u.lastname,
							ISNULL(u.nickname, u.firstname) firstname, 
							u.bio, 
							u.phone,
							c.title' . langExt() . ' organization,
							u.organization_id,
							o.name office, 
							o.isMain,
							u.title, 
							d.departmentName department
						FROM users u
						LEFT JOIN users_to_channels u2c ON u.id = u2c.user_id
						LEFT JOIN departments d	ON d.departmentID = u.departmentID 
						LEFT JOIN organizations c ON u.organization_id = c.id
						LEFT JOIN offices o ON o.id = u.officeID
						' . getChannelsWhere('users', 'u', 'user_id') . ' AND ' . $where . '
						ORDER BY u.lastname, ISNULL(u.nickname, u.firstname)');
    foreach ($result as &$r) {
        $link = '/staff/view.php?id=' . $r['id'];
        $r['pic'] = draw_img(file_dynamic('users', 'image_small', $r['id'], 'jpg'), $link);
        $r['name'] = draw_link($link, $r['lastname'] . ', ' . $r['firstname']);
        if (getOption('staff_showoffice')) {
            $r['name'] .= '<br/>' . $r['office'];
        }
        if (getOption('staff_showdept')) {
            $r['title'] .= '<br/>' . $r['department'];
        } else {
            $r['title'] .= '<br/>' . draw_link('organizations.php?id=' . $r['organization_id'], format_string($r['organization']));
        }
        if ($showDelete) {
            $r['del'] = drawColumnDelete($r['id']);
        }
    }
    return $t->draw($result, $errmsg);
}
예제 #10
0
파일: index.php 프로젝트: Rhenan/intranet-1
    $f->set_field(array('name' => 'content', 'label' => getString('file'), 'type' => 'file', 'additional' => getString('upload_max') . file_get_max()));
    $f->set_field(array('name' => 'categories', 'label' => getString('categories'), 'type' => 'checkboxes', 'options_table' => 'dl_categories', 'option_title' => 'title', 'linking_table' => 'dl_docs_to_categories', 'object_id' => 'doc_id', 'option_id' => 'category_id'));
    echo $f->draw();
} else {
    $result = db_table('SELECT 
					d.id, 
					d.title, 
					' . db_updated('d') . ', 
					d.extension,
					c.title "group"
			FROM dl_docs d
			JOIN dl_docs_to_categories d2c ON d.id = d2c.doc_id
			JOIN dl_categories c ON d2c.category_id = c.id
			ORDER BY c.precedence, d.title;');
    $links = $page['is_admin'] ? array(url_query_add(array('doc_id' => 'new'), false) => getString('add_new')) : false;
    $t = new table('dl_docs', drawHeader($links));
    $t->set_column('icon', 'd', '&nbsp;');
    $t->set_column('title', 'l', getString('title'));
    $t->set_column('updated', 'r', getString('updated'));
    foreach ($result as &$r) {
        $link = 'info.php?id=' . $r['id'];
        $r['icon'] = file_icon($r['extension'], $link);
        $r['title'] = draw_link($link, $r['title']);
        if (getOption('languages')) {
            $r['title'] .= ' (' . $r['language'] . ')';
        }
        $r['updated'] = format_date($r['updated']);
    }
    echo $t->draw($result, getString('documents_empty'));
}
echo drawBottom();
예제 #11
0
<?php

include '../include.php';
echo drawTop();
$t = new table('staff', drawHeader());
$t->set_column('picture', 'l', '&nbsp;', '50');
$t->set_column('name');
$t->set_column('organization');
$t->set_column('last_login', 'r');
$result = db_table('SELECT u.id, u.firstname, u.lastname, u.title, o.title organization, u.organization_id, u.lastLogin last_login FROM users u LEFT JOIN organizations o ON u.organization_id = o.id JOIN users_to_modules u2m ON u.id = u2m.user_id WHERE u.is_active = 1 AND u2m.module_id = ' . $page['module_id'] . ' ORDER BY u.lastname, u.firstname');
foreach ($result as &$r) {
    $link = '/staff/view.php?id=' . $r['id'];
    $r['picture'] = draw_img(file_dynamic('users', 'image_small', $r['id'], 'jpg'), $link);
    $r['name'] = draw_link($link, $r['firstname'] . ' ' . $r['lastname']);
    if ($r['organization']) {
        $r['organization'] = draw_link('/staff/organizations.php?id=' . $r['organization_id'], $r['organization']) . '<br>';
    }
    $r['organization'] .= $r['title'];
    $r['last_login'] = format_date($r['last_login']);
}
echo $t->draw($result, 'No administrators for this module yet!');
echo drawBottom();
예제 #12
0
파일: edit.php 프로젝트: Rhenan/intranet-1
    $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;
}
//type id was auto-setting checkbox
echo '<a name="bottom"></a>';
$f = new form('external_orgs', @$_GET['id'], $title);
if (!$included) {
    $f->set_title_prefix(drawHeader(false, ' '));
}
$f->set_field(array('name' => 'title' . langExt(), 'type' => 'text', 'label' => getString('title')));
$f->set_field(array('name' => 'description' . langExt(), 'type' => 'textarea', 'label' => getString('description'), 'class' => 'tinymce'));
$f->set_field(array('name' => 'url' . langExt(), 'type' => 'text', 'label' => getString('url')));
$f->set_field(array('name' => 'types', 'label' => getString('type'), 'option_title' => 'title' . langExt(), 'type' => 'checkboxes', 'options_table' => 'external_orgs_types', 'linking_table' => 'external_orgs_to_types', 'object_id' => 'org_id', 'option_id' => 'type_id'));
formAddChannels($f, 'external_orgs', 'org_id');
langUnsetFields($f, 'title,description');
langTranslateCheckbox($f, url_id());
echo $f->draw($r, !$included);
if (!$included) {
    echo drawBottom();
}
예제 #13
0
파일: links.php 프로젝트: Rhenan/intranet-1
    url_drop('id');
} elseif (url_action('delete') && url_id('delete_id')) {
    db_delete('links', $_GET['delete_id']);
    url_drop('delete_id,action');
}
echo drawTop();
if (url_id()) {
    //form
    $f = new form('links', @$_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('links', drawHeader());
    $t->set_column('draggy', 'd', '&nbsp;');
    $t->set_column('title', 'l', getString('title'));
    $t->set_column('delete', 'd', '&nbsp;');
    $result = db_table('SELECT l.id, l.title' . langExt() . ' title FROM links l WHERE l.is_active = 1 ORDER BY l.precedence');
    $t->set_draggable('draggy');
    foreach ($result as &$r) {
        $r['draggy'] = draw_img('/images/icons/move.png');
        $r['title'] = draw_link('links.php?id=' . $r['id'], $r['title']);
        $r['delete'] = drawColumnDelete($r['id']);
    }
    echo $t->draw($result, 'No modules');
    //add new
    $f = new form('links');
    $f->set_field(array('type' => 'text', 'name' => 'title' . langExt(), 'label' => getString('title')));
    langUnsetFields($f, 'title');
예제 #14
0
} elseif (url_action('delete')) {
    db_delete('dl_categories');
    url_drop('action,id');
}
echo drawTop();
if (!empty($_GET['category_id'])) {
    //category form
    if ($_GET['category_id'] == 'new') {
        $_GET['category_id'] = false;
    }
    $f = new form('dl_categories', $_GET['category_id'], ($_GET['category_id'] ? 'Edit' : 'Add') . ' Category');
    $f->set_title_prefix($page['breadcrumbs']);
    echo $f->draw();
} else {
    //list of categories
    $result = db_table('SELECT id, title, ' . db_updated() . ' FROM dl_categories WHERE is_active = 1 ORDER BY precedence');
    $links = $page['is_admin'] ? array(url_query_add(array('category_id' => 'new'), false) => getString('add_new')) : false;
    $t = new table('dl_categories', drawHeader($links));
    $t->set_column('draggy', 'd', '&nbsp;');
    $t->set_column('title', 'l', getString('title'));
    $t->set_column('updated', 'r', getString('updated'));
    $t->set_column('delete', 'd', '&nbsp;');
    foreach ($result as &$r) {
        $r['draggy'] = draw_img('/images/icons/move.png');
        $r['title'] = draw_link(url_query_add(array('category_id' => $r['id']), false), $r['title']);
        $r['updated'] = format_date($r['updated']);
        $r['delete'] = draw_link(url_query_add(array('action' => 'delete', 'id' => $r['id']), false), 'x', false, 'confirm');
    }
    echo $t->draw($result, getString('categories_empty'));
}
echo drawBottom();
예제 #15
0
<?php

include "../include.php";
echo drawTop();
$result = db_table('SELECT 
		d.id,
		d.title' . langExt() . ' title,
		(SELECT COUNT(*) FROM docs_views v WHERE v.documentID = d.id) downloads,
		i.extension,
		i.description alt
	FROM docs d
	JOIN docs_types i ON d.type_id = i.id
	' . getChannelsWhere('docs', 'd', 'doc_id') . '
	ORDER BY downloads DESC', 20);
$t = new table('docs', drawHeader());
$t->set_column('icon', 'd', '&nbsp;');
$t->set_column('title', 'l', getString('title'));
$t->set_column('downloads', 'r', getString('downloads'));
foreach ($result as &$r) {
    $link = 'info.php?id=' . $r['id'];
    $r['icon'] = file_icon($r['extension'], $link);
    $r['title'] = draw_link($link, $r['title']);
}
echo $t->draw($result, getString('documents_empty'));
echo drawBottom();
예제 #16
0
파일: index.php 프로젝트: Rhenan/intranet-1
<?php

include '../../include.php';
if (url_action('delete')) {
    db_delete('soc_whatsnew', $_GET['delete_id']);
    url_drop('action,delete_id');
}
echo drawTop();
$t = new table('soc_whatsnew', drawHeader(array('edit/' => getString('add_new'))));
$t->set_column('draggy', 'd', '&nbsp;');
$t->set_column('title', 'l', getString('title'));
$t->set_column('updated', 'r', getString('updated'));
$t->set_column('delete', 'd', '&nbsp;');
$result = db_table('SELECT w.id, w.title' . langExt() . ' title, ' . db_updated('w') . ' FROM soc_whatsnew w WHERE w.is_active = 1 ORDER BY w.precedence');
foreach ($result as &$r) {
    $r['draggy'] = draw_img('/images/icons/move.png');
    $r['title'] = draw_link('edit.php?id=' . $r['id'], format_string($r['title'], 70));
    $r['updated'] = format_date($r['updated']);
    $r['delete'] = drawColumnDelete($r['id']);
}
echo $t->draw($result);
echo drawBottom();
예제 #17
0
    url_drop('id');
} elseif (url_action('delete') && url_id('delete_id')) {
    db_delete('channels', $_GET['delete_id']);
    url_drop('delete_id,action');
}
echo drawTop();
if (url_id()) {
    //form
    $f = new form('channels', @$_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('channels', drawHeader());
    $t->set_column('draggy', 'd', '&nbsp;');
    $t->set_column('title', 'l', getString('title'));
    $t->set_column('delete', 'd', '&nbsp;');
    $result = db_table('SELECT id, title' . langExt() . ' title FROM channels WHERE is_active = 1 ORDER BY precedence');
    $t->set_draggable('draggy');
    foreach ($result as &$r) {
        $r['draggy'] = draw_img('/images/icons/move.png');
        $r['title'] = draw_link('channels.php?id=' . $r['id'], $r['title']);
        $r['delete'] = drawColumnDelete($r['id']);
    }
    echo $t->draw($result, 'No modules');
    //add new
    $f = new form('channels');
    $f->set_field(array('type' => 'text', 'name' => 'title' . langExt(), 'label' => getString('title')));
    langUnsetFields($f, 'title');
예제 #18
0
파일: index.php 프로젝트: Rhenan/intranet-1
<?php

include '../../include.php';
if (url_action('delete')) {
    db_delete('soc_members', $_GET['delete_id']);
    url_drop('action,delete_id');
}
echo drawTop();
$t = new table('soc_members', drawHeader(array('edit.php' => 'Add New')));
$t->set_column('is_selected', 'd', '&nbsp;');
$t->set_column('name');
$t->set_column('updated', 'r');
$t->set_column('delete', 'd', '&nbsp;');
$result = db_table('SELECT m.id, m.name, m.is_selected, c.en "group", ' . db_updated('m') . ' FROM soc_members m JOIN jr_countries c ON m.country_id = c.id WHERE m.is_active = 1 ORDER BY c.en, m.name');
foreach ($result as &$r) {
    $r['is_selected'] = draw_form_checkbox('foo', $r['is_selected'], false, 'ajax_set(\'soc_members\', \'is_selected\', ' . $r['id'] . ', ' . abs($r['is_selected'] - 1) . ');');
    $r['name'] = draw_link('edit.php?id=' . $r['id'], format_string($r['name'], 70));
    $r['updated'] = format_date($r['updated']);
    $r['delete'] = drawColumnDelete($r['id']);
}
echo $t->draw($result);
echo drawBottom();
예제 #19
0
<?php

include "include.php";
if (url_action('delete')) {
    db_delete('bb_topics_types');
    url_drop('action,id');
}
echo drawTop();
$t = new table('bb_topics_types', drawHeader($page['is_admin'] ? array('category_edit.php' => getString('category_new')) : false));
$t->set_column('category', 'l', getString('category'));
$t->set_column('topics', 'r', getString('topics'));
if ($page['is_admin']) {
    $t->set_column('delete', 'd', '&nbsp;');
}
$result = db_table('SELECT 
		y.id, 
		y.title' . langExt() . ' category, 
		(SELECT COUNT(*) FROM bb_topics t WHERE t.type_id = y.id AND t.is_active = 1) topics 
	FROM bb_topics_types y 
	WHERE y.is_active = 1
	ORDER BY y.title');
foreach ($result as &$r) {
    $r['category'] = draw_link('category.php?id=' . $r['id'], $r['category']);
    if ($page['is_admin']) {
        $r['delete'] = draw_img('/images/icons/delete.png', url_query_add(array('action' => 'delete', 'id' => $r['id']), false));
    }
}
echo $t->draw($result, 'No categories added yet');
echo drawBottom();
예제 #20
0
파일: edit.php 프로젝트: Rhenan/intranet-1
<?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();
예제 #21
0
<?php

require '../Core/SCV2_Core.php';
init_SCV2();
if (isset($_GET['Username'])) {
    $Username = rawurldecode($_GET['Username']);
    $mysqli = connect_DB();
    $mysqli->real_query("SELECT `Username`,`Password` \n                            FROM `user` \n                            WHERE `Username`='{$Username}'");
    if ($result = $mysqli->use_result()) {
        $data = $result->fetch_assoc();
        extract($data);
    } else {
        die($mysqli->error);
    }
} elseif (xsrf_guard()) {
    init_var($_POST['btnCancel']);
    if ($_POST['btnCancel']) {
        header('location: ListView_Users.php');
        exit;
    }
}
drawHeader($errMsg);
drawPageTitle('Detail View: Users');
drawFieldSetStart();
drawTextField('Username', 'Username', TRUE);
drawTextField('Password', 'Password', TRUE);
drawBackButton();
drawFieldSetEnd();
drawFooter();
예제 #22
0
파일: index.php 프로젝트: Rhenan/intranet-1
<?php

include "../include.php";
echo drawTop();
$result = db_table('SELECT 
		c.id, 
		c.title' . langExt() . ' title, 
		c.pub_date, 
		t.title' . langExt() . ' "group", 
		c.publication' . langExt() . ' publication, 
		' . db_updated('c') . '
	FROM press_clips c 
	JOIN press_clips_types t ON c.type_id = t.id 
	' . getChannelsWhere('press_clips', 'c', 'clip_id') . '
	ORDER BY t.title, pub_date DESC', 20);
$t = new table('press-clips', drawHeader(array('edit.php' => getString('add_new'))));
$t->set_column('title', 'l', getString('title'));
foreach ($result as &$r) {
    $r['title'] = draw_link("clip.php?id=" . $r["id"], format_string($r["title"], 80)) . '<br>' . $r["publication"] . ' <span class="light">' . format_date($r["pub_date"]) . '</span>';
}
echo $t->draw($result, getString('pressclips_recent_empty'));
include "edit.php";
echo drawBottom();
예제 #23
0
파일: pages.php 프로젝트: Rhenan/intranet-1
<?php

include "../../include.php";
if (url_id('module_id')) {
    $result = db_table('SELECT p.id, p.title, p.url, p.is_hidden FROM pages p WHERE module_id = ' . $_GET['module_id'] . ' ORDER BY p.precedence');
} elseif (url_id('modulette_id')) {
    $result = db_table('SELECT p.id, p.title, p.url, p.is_hidden FROM pages p WHERE modulette_id = ' . $_GET['modulette_id'] . ' ORDER BY p.precedence');
} else {
    url_change('./');
}
echo drawTop();
//pages list
$t = new table('pages', drawHeader());
$t->set_column('is_hidden', 'd', '&nbsp;');
$t->set_column('draggy', 'd', '&nbsp;');
$t->set_column('title', 'l', getString('title'));
$t->set_column('url');
$t->set_draggable('draggy');
foreach ($result as &$r) {
    $r['is_hidden'] = draw_form_checkbox('foo', !$r['is_hidden'], false, 'ajax_set(\'pages\', \'is_hidden\', ' . $r['id'] . ', ' . abs($r['is_hidden'] - 1) . ');');
    $r['draggy'] = draw_img('/images/icons/move.png');
    $r['title'] = draw_link('page.php?id=' . $r['id'], $r['title']);
    if (empty($r['url'])) {
        $r['url'] = 'index.php';
    }
}
echo $t->draw($result, 'No pages');
echo drawBottom();
예제 #24
0
파일: About.php 프로젝트: seans888/APC-CPO
<?php

require 'Core/SCV2_Core.php';
init_SCV2();
if (!isset($_SESSION['Project_ID'])) {
    $_SESSION['Project_ID'] = 'TEMP';
}
if (!isset($_SESSION['Project_Name'])) {
    $_SESSION['Project_Name'] = '(NO PROJECT)';
}
drawHeader(FALSE);
drawPageTitle("Cobalt", "Created by <a href=About_JV_Roig.php class=blue>JV Roig</a>", 'message');
if ($_SESSION['Project_ID'] == 'TEMP') {
    unset($_SESSION['Project_ID']);
}
if ($_SESSION['Project_Name'] == '(NO PROJECT)') {
    unset($_SESSION['Project_Name']);
}
?>
<table border=0 cellpadding=2 cellspacing=2>
<tr>
    <td valign=top>
    <fieldset class="container">
        <span class="graytext">
        &nbsp;&nbsp;&nbsp;&nbsp; Cobalt is a web-based code generator and framework using PHP and Oracle Database, created by JV Roig. <br><br>

        &nbsp;&nbsp;&nbsp;&nbsp; It is a code generator, so it is capable of producing a complete working system
        based on the information you feed it (data dictionary and a few miscellaneous data for
        certain special cases).<br><br>

        &nbsp;&nbsp;&nbsp;&nbsp; It is also a framework. This means it contains functions that allow you to create
예제 #25
0
<?php

//including feedbacklayout php file
require_once "../Includes/FeedbackLayout.php";
//to draw header drawHeader() is calling
drawHeader("Semester Registration System");
//initialize the session if it is not initialized
if (!isset($_SESSION)) {
    session_start();
}
//to redirect to logout.php page if user is not logged in
if (!isset($_SESSION['SESS_USERNAME'])) {
    header("Location:../Logout.php");
}
?>


<div>
	<h1><u><b><center>Semester Registration System</center></b></u></h1>
</div>

<div>
	<?php 
//to include conn_time_table.php to make connection with database
require_once 'Connections/conn_time_table.php';
?>

<script>
<?php 
//function for Ajax
?>
}
mysqli_free_result($result);
// Some basic data
$hIndex = $thisFacultyArray['hindex'];
$hflIndex = $thisFacultyArray['hflindex'];
$totalCitations = $thisFacultyArray['totalCitations'];
$flCitations = $thisFacultyArray['totalflCitations'];
?>
<div id='profile'>

<?php 
$metricsData = array("hIndex" => $hIndex, "hflIndex" => $hflIndex, "h_distribution" => json_encode($distributions["h"], true), "hfl_distribution" => json_encode($distributions["hfl"], true), "hMatrix" => array("type" => "faculty", "id" => $internetId), "firstName" => $thisFacultyArray['firstName'], "deptName" => $thisFacultyArray['deptName'], "citation_data" => json_encode($citation_data, true), "tenure_status" => $thisFacultyArray['tenure_status']);
$headerArray = array("header" => $thisFacultyArray['firstName'] . " " . $thisFacultyArray['lastName'], "scopusId" => $thisFacultyArray['scopusId'], "subHeader" => array("tenure_status" => $thisFacultyArray['tenure_status'], "class_description" => $thisFacultyArray['class_description'], "title" => $thisFacultyArray['title'], "dept" => $thisFacultyArray['deptName']));
$summary_faculty = array("totalCitations" => $totalCitations, "totalflCitations" => $flCitations, "hIndex" => $hIndex, "hflIndex" => $hflIndex, "pubCount" => $thisFacultyArray['pubCount'], "flPubCount" => $thisFacultyArray['flPubCount']);
// Create page header
drawHeader($headerArray);
?>

<div id='top_publications'></div>	

<?php 
// Create overview module
drawSummary($summary_faculty);
?>
						

<div id='publications'></div>

<?php 
// List top-cited publications
drawPublicationList($type, $internetId, $thisFacultyArray['deptId'], null, null, "top_publications");
예제 #27
0
<?php

//including feedbacklayout php file
require_once "../Includes/FeedbackLayout.php";
//to draw header drawHeader() is calling
drawHeader("TimeTable Info System");
//initialize the session if it is not initialized
if (!isset($_SESSION)) {
    session_start();
}
//to redirect to logout.php page if user is not logged in
if (!isset($_SESSION['SESS_USERNAME'])) {
    header("Location:../Logout.php");
}
?>
<div id="heading">
	<h1><u><b><center>Time Table Information System</center></b></u></h1>
</div>
<div class="class_room">
	<center><h3><a href="#" onclick="history.go(-1)">GO BACK</a></h3></center>

<head>
<script>
function showRoom(str){
	var xmlhttp;    
	if (str==""){
		document.getElementById("txtHint").innerHTML="";
		return;
	}
  
	if (window.XMLHttpRequest){
예제 #28
0
<?php

include "../include.php";
echo drawTop();
$t = new table('bb_topics', drawHeader());
$t->set_column('contact', 'l', 'Contact Record');
$t->set_column('action');
//$t->set_column('contact', 'l', 'Done By');
$t->set_column('when', 'r');
$result = db_table('SELECT
			c.id,
			c.firstname,
			c.lastname,
			c.updated_date,
			' . db_updated('c') . '
		FROM contacts c
		ORDER BY updated DESC', 40);
foreach ($result as &$r) {
    $r['contact'] = draw_link('contact.php?id=' . $r['id'], $r['lastname'] . ', ' . $r['firstname']);
    $r['action'] = $r['updated_date'] ? 'Update' : 'New Contact';
    $r['when'] = format_date($r['updated']);
}
echo $t->draw($result);
echo drawBottom();
예제 #29
0
    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', '&nbsp;');
    $t->set_column('title', 'l', getString('title'));
    $t->set_column('delete', 'd', '&nbsp;');
    $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']);
    }
    echo $t->draw($result, 'No organizations');
    //add new
    $f = new form('organizations');
    $f->set_field(array('type' => 'text', 'name' => 'title' . langExt(), 'label' => getString('title')));
    langUnsetFields($f, 'title');
    echo $f->draw(false, false);
예제 #30
0
<?php

include "../include.php";
echo drawTop();
if (url_id()) {
    $title = db_grab('SELECT title' . langExt() . ' title FROM press_clips_types WHERE id = ' . $_GET["id"]);
    $result = db_table('SELECT c.id, c.title' . langExt() . ' title, c.pub_date, c.publication' . langExt() . ' publication, ISNULL(c.created_date, c.updated_date) updated FROM press_clips c ' . getChannelsWhere('press_clips', 'c', 'clip_id') . ' AND c.type_id = ' . $_GET["id"] . ' ORDER BY updated DESC');
    $t = new table('press_clips', drawHeader(false, $title));
    $t->set_column('title', 'l', getString('title'));
    $t->set_column('publication', 'l', getString('publication'));
    $t->set_column('pub_date', 'r', getString('published'));
    foreach ($result as &$r) {
        $r['title'] = draw_link('clip.php?id=' . $r['id'], format_string($r['title'], 50));
        $r['pub_date'] = format_date($r['pub_date']);
    }
    echo $t->draw($result, 'There are no clips tagged <i>' . $title . '</i>.');
} else {
    $t = new table('press_clips', drawHeader());
    $t->set_column('category', 'l', getString('category'));
    $t->set_column('clips', 'r', getString('clips'));
    $result = db_table('SELECT t.id, t.title' . langExt() . ' category, (SELECT COUNT(*) FROM press_clips c WHERE c.type_id = t.id) clips FROM press_clips_types t ORDER BY t.precedence');
    foreach ($result as &$r) {
        $r['category'] = draw_link(url_query_add(array('id' => $r['id']), false), $r['category']);
    }
    echo $t->draw($result);
}
echo drawBottom();