コード例 #1
0
function respond()
{
    if (validate_fields()) {
        build_header();
        send();
    }
}
コード例 #2
0
ファイル: index.php プロジェクト: JazzHandsCMDB/jazzhands
        $row = pg_fetch_array($r, null, PGSQL_ASSOC);
        if (isset($row['tally'])) {
            $numrows = $row['tally'];
        }
        $numpages = 0;
        $numpages = ceil($numrows / $numshow) - 1;
        $showarrow = 1;
        break;
    case 'bydept':
    case 'byteam':
        $style = 'teamlist';
        $query = "\n\t\t\tselect\tdistinct\n\t\t\t\t\taccount_collection_name,\n\t\t\t\t\taccount_collection_id\n\t\t\t from\taccount_collection\n\t\t\t \t\tinner join account_collection_account\n\t\t\t\t\t\t\tusing(account_collection_id)\n\t\t\t\t\tinner join v_corp_family_account a\n\t\t\t\t\t\t\tusing(account_id)\n\t\t\t\t\tinner join val_person_status vps\n\t\t\t\t\t\t\ton vps.person_status = account_status\n\t\t\twhere\taccount_collection_type = 'department'\n\t\t\t and\ta.is_enabled = 'Y'\n\t\t\t\t\n\t\t\torder by account_collection_name\n\t\t";
        $result = pg_query($query) or die('Query failed: ' . pg_last_error());
        break;
}
echo build_header("Directory");
if ($style == 'peoplelist') {
    // Printing results in HTML
    echo browsingMenu($dbconn, $index, preg_match('/^by(office|name)$/', $index) ? 'both' : 'default');
    echo "<table id=\"peoplelist\">\n";
    ?>


	<tr>
	<td> </td>
	<td> Employee Name </td> 
	<td> Title </td> 
	<td> Company </td> 
	<td> Manager </td> 
	<td> Functional Team </td> 
	<td> Location </td> 
コード例 #3
0
ファイル: build_diff.php プロジェクト: HighwayofLife/phpbb3
/**
* $output_format can be: language, prosilver and subsilver2
*/
function build_code_changes($output_format)
{
    global $substitute_new, $substitute_old, $simple_name_old, $simple_name_new, $echo_changes, $package_changed_files, $location, $debug_file, $s_name;
    // Global array holding the data entries
    $data = array('header' => array(), 'diff' => array());
    // Read diff file and prepare the output filedata...
    //$patch_filename = '../new_version/patches/phpBB-' . $substitute_old . '_to_' . $substitute_new . '.patch';
    $release_filename = 'phpbb-' . $substitute_old . '_to_' . $substitute_new . '_' . $output_format . '.txt';
    if (!$package_changed_files) {
        if (!$echo_changes) {
            $fp = fopen('save/' . $s_name . '/' . $output_format . '/' . $release_filename, 'wb');
            if (!$fp) {
                die('Unable to create ' . $release_filename);
            }
        }
    }
    include_once $location . '/build_helper.php';
    $package = new build_package(array($substitute_old, $substitute_new), false);
    $titles = array('language' => 'phpBB ' . $substitute_old . ' to phpBB ' . $substitute_new . ' Language Pack Changes', 'prosilver' => 'phpBB ' . $substitute_old . ' to phpBB ' . $substitute_new . ' prosilver Changes', 'subsilver2' => 'phpBB ' . $substitute_old . ' to phpBB ' . $substitute_new . ' subsilver2 Changes');
    $data['header'] = array('title' => $titles[$output_format], 'intro' => '

These are the ' . $titles[$output_format] . ' summed up into a little Mod. These changes are only partial and do not include any code changes, therefore not meant for updating phpBB.

	', 'included_files' => array());
    // We collect the files we want to diff first (ironically we grab this from a diff file)
    if (!$echo_changes) {
        echo "\n\nCollecting Filenames:";
    }
    // We re-create the patch file
    foreach ($package->old_packages as $_package_name => $dest_package_filename) {
        chdir($package->locations['old_versions']);
        if (!$echo_changes) {
            echo "\n\n" . 'Creating patch/diff files for phpBB-' . $dest_package_filename . $package->get('new_version_number');
        }
        $dest_package_filename = $location . '/save/' . $s_name . '/phpBB-' . $dest_package_filename . $package->get('new_version_number') . '.patch';
        $package->run_command('diff ' . $package->diff_options . ' ' . $_package_name . ' ' . $package->get('simple_name') . ' > ' . $dest_package_filename);
        // Parse this diff to determine file changes from the checked versions and save them
        $result = $package->collect_diff_files($dest_package_filename, $_package_name);
        $package->run_command('rm ' . $dest_package_filename);
    }
    chdir($location);
    $filenames = array();
    foreach ($result['files'] as $filename) {
        if ($debug_file !== false && $filename != $debug_file) {
            continue;
        }
        // Decide which files to compare...
        switch ($output_format) {
            case 'language':
                if (strpos($filename, 'language/en/') !== 0) {
                    continue 2;
                }
                break;
            case 'prosilver':
                if (strpos($filename, 'styles/prosilver/') !== 0) {
                    continue 2;
                }
                break;
            case 'subsilver2':
                if (strpos($filename, 'styles/subsilver2/') !== 0) {
                    continue 2;
                }
                break;
        }
        if (!file_exists($location . '/old_versions/' . $simple_name_old . '/' . $filename)) {
            // New file... include it
            $data['header']['included_files'][] = array('old' => $location . '/old_versions/' . $simple_name_old . '/' . $filename, 'new' => $location . '/old_versions/' . $simple_name_new . '/' . $filename, 'phpbb_filename' => $filename);
            continue;
        }
        $filenames[] = array('old' => $location . '/old_versions/' . $simple_name_old . '/' . $filename, 'new' => $location . '/old_versions/' . $simple_name_new . '/' . $filename, 'phpbb_filename' => $filename);
    }
    // Now let us go through the filenames list and create a more comprehensive diff
    if (!$echo_changes) {
        fwrite($fp, build_header($output_format, $filenames, $data['header']));
    } else {
        //echo build_header('text', $filenames, $data['header']);
    }
    // Copy files...
    $files_to_copy = array();
    foreach ($data['header']['included_files'] as $filename) {
        $files_to_copy[] = $filename['phpbb_filename'];
    }
    // First step is to copy the new version over (clean structure)
    if (!$echo_changes && sizeof($files_to_copy)) {
        foreach ($files_to_copy as $file) {
            // Create directory?
            $dirname = dirname($file);
            if ($dirname) {
                $dirname = explode('/', $dirname);
                $__dir = array();
                foreach ($dirname as $i => $dir) {
                    $__dir[] = $dir;
                    run_command("mkdir -p {$location}/save/" . $s_name . '/' . $output_format . '/' . implode('/', $__dir));
                }
            }
            $source_file = $location . '/new_version/phpBB3/' . $file;
            $dest_file = $location . '/save/' . $s_name . '/' . $output_format . '/';
            $dest_file .= $file;
            $command = "cp -p {$source_file} {$dest_file}";
            $result = trim(`{$command}`);
            echo "- Copied File: " . $source_file . " -> " . $dest_file . "\n";
        }
    }
    include_once 'diff_class.php';
    if (!$echo_changes) {
        echo "\n\nDiffing Codebases:";
    }
    foreach ($filenames as $file_ary) {
        if (!file_exists($file_ary['old'])) {
            $lines1 = array();
        } else {
            $lines1 = file($file_ary['old']);
        }
        $lines2 = file($file_ary['new']);
        if (!sizeof($lines1)) {
            // New File
        } else {
            $diff = new Diff($lines1, $lines2);
            $fmt = new BBCodeDiffFormatter(false, 5, $debug_file);
            if (!$echo_changes) {
                fwrite($fp, $fmt->format_open($file_ary['phpbb_filename']));
                fwrite($fp, $fmt->format($diff, $lines1));
                fwrite($fp, $fmt->format_close($file_ary['phpbb_filename']));
            } else {
                echo $fmt->format_open($file_ary['phpbb_filename']);
                echo $fmt->format($diff, $lines1);
                echo $fmt->format_close($file_ary['phpbb_filename']);
            }
            if ($debug_file !== false) {
                echo $fmt->format_open($file_ary['phpbb_filename']);
                echo $fmt->format($diff, $lines1);
                echo $fmt->format_close($file_ary['phpbb_filename']);
                exit;
            }
        }
    }
    if (!$echo_changes) {
        fwrite($fp, build_footer($output_format));
        // Close file
        fclose($fp);
        chmod('save/' . $s_name . '/' . $output_format . '/' . $release_filename, 0666);
    } else {
        echo build_footer($output_format);
    }
}
コード例 #4
0
ファイル: statusReport.php プロジェクト: rohcehlam/rflow
$query_rsEmployees = "SELECT employeeID, engineer, displayName FROM employees WHERE engineer = 'y' AND active = 't' ORDER BY displayName ASC";
$rsEmployees = $conn->query($query_rsEmployees) or die("<div class='alert alert-danger' role='alert'>{$conn->error}</div>");
//$row_rsEmployees = $rsEmployees->fetch_assoc();
$totalRows_rsEmployees = $rsEmployees->num_rows;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	 <head>
		  <title><?php 
buildTitle("Status Report: " . stripslashes($row_rsStatusReport['subject']));
?>
</title>
		  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

		  <?php 
build_header();
?>

		  <script src="../js/bootstrap-datepicker.js"></script>
		  <link rel="stylesheet" href="../css/datepicker.css"/>
	 </head>
	 <body class="skin-blue layout-top-nav">

		  <div class="wrapper">
				<header class="main-header">
					 <?php 
build_navbar($conn, 2);
?>
				</header> 
		  </div>
コード例 #5
0
<?php

/*********************************************
/* Query Script for GiantDisc Server
   written by Andreas Baierl in 2009

   Project Homepage: http://sourceforge.net/projects/gdrestfulwebint/
   Help: http://sourceforge.net/apps/mediawiki/gdrestfulwebint/index.php!

*/
require_once "includes/inc.includes.php";
// Include necessary files
build_header("Query");
build_body("Query", "2", "onload=\"JavaScript:init();\"");
echo '
	Query-String:<br /><br />
	<input type="text" size="150" name="query_string" id="query_string" />
	<input type="hidden" name="query" value="1" />
	<p><input type="submit" name="submit" value="Submit Query" onclick="do_query();"/></p>
	<div id="queryresult"></div>';
build_footer();
コード例 #6
0
ファイル: mitglied.php プロジェクト: rellla/djkclient
<?php

require "includes/inc.html.php";
// HTML Render Routines
require_once "includes/settings.php";
// Global Settings
if (isset($_GET['id'])) {
    $id = $_GET['id'];
} else {
    $id = 1;
}
build_header("Details Mitglied");
?>



<script>
	$(document).ready(function(){
	<?php 
include "includes/inc.jsonload.php";
?>
	$('#mitglied').load('includes/edit_mitglied.php?id=<?php 
print $_GET['id'];
?>
',
		function() {
		}
	);
});
</script>
コード例 #7
0
/**
 * Get Page Header HTML
 *
 * This will return header html for a particular page. This will include the 
 * meta desriptions & keywords, canonical and title tags
 *
 * @since 1.0
 * @uses exec_action
 * @uses get_page_url
 * @uses strip_quotes
 * @uses get_page_meta_desc
 * @uses get_page_meta_keywords
 * @uses $metad
 * @uses $title
 * @uses $content
 * @uses $site_full_name from configuration.php
 * @uses GSADMININCPATH
 *
 * @return string HTML for template header
 */
function get_header($full = true)
{
    echo build_header($full);
    exec_action('theme-header');
    // @hook theme-header after get_header output html
}
コード例 #8
0
<?php

/*********************************************
/* Browse Script for GiantDisc Server
   written by Andreas Baierl in 2009

   Project Homepage: http://sourceforge.net/projects/gdrestfulwebint/
   Help: http://sourceforge.net/apps/mediawiki/gdrestfulwebint/index.php

*/
require_once "includes/inc.includes.php";
// Include necessary files
build_header("Browse");
build_body("Browse");
// get parameters
$level0 = $_GET['level0'];
$level1 = $_GET['level1'];
$level2 = urldecode($_GET['level2']);
$ar = $_GET['ar'];
$tr = $_GET['tr'];
$sourceid = $_GET['sourceid'];
// set trackrow parameters (to be improved! OOP!)
$trackrow_param->artist = TRUE;
$trackrow_param->title = TRUE;
$trackrow_param->length = TRUE;
$trackrow_param->play = TRUE;
$trackrow_param->edit = TRUE;
#######################################################################################
### Show first level:
// print the main top menu
print "<div class='browsemenu'>\n";
コード例 #9
0
ファイル: contact.php プロジェクト: JazzHandsCMDB/jazzhands
// there should be only one row
$query = "\n\tSELECT  p.person_id,\n\t\tcoalesce(p.preferred_first_name, p.first_name) as first_name,\n\t\tcoalesce(p.preferred_last_name, p.last_name) as last_name,\n\t\tcoalesce(pc.nickname, p.nickname) as nickname,\n\t\tpc.position_title,\n\t\tpc.person_company_relation,\n\t\tdate_part('month', p.birth_date) as birth_date_month,\n\t\tdate_part('day', p.birth_date) as birth_date_day,\n\t\tdate_part('epoch', p.birth_date) as birth_date_epoch,\n\t\tpc.hire_date,\n\t\tc.company_name,\n\t\tc.company_id,\n\t\tpi.person_image_id,\n\t\tpc.manager_person_id,\n\t\tcoalesce(mgrp.preferred_first_name, mgrp.first_name) as mgr_first_name,\n\t\tcoalesce(mgrp.preferred_last_name, mgrp.last_name) as mgr_last_name,\n\t\tac.account_collection_id,\n\t\tac.account_collection_name,\n\t\ta.login,\n\t\tnumreports.tally as num_reports,\n\t\tofc.display_label,\n\t\tofc.physical_address_id,\n\t\tofc.building,\n\t\tofc.floor,\n\t\tofc.section,\n\t\tofc.seat_number\n\tFROM v_corp_family_account a\n\t\tINNER JOIN person p using (person_id)\n\t\tINNER JOIN company c using (company_id)\n\t\tINNER JOIN person_company pc using (person_id,company_id)\n\t\tLEFT JOIN ( select ac.*, account_id\n\t\t\t    FROM account_collection ac\n\t\t\t\tINNER JOIN account_collection_account\n\t\t\t\tUSING (account_collection_id)\n\t\t\t    WHERE account_collection_type = 'department'\n\t\t) ac USING (account_id)\n\t\tLEFT JOIN (\n\t\t    select  pi.*, piu.person_image_usage\n\t\t      from  person_image pi\n\t\t\t    inner join person_image_usage piu\n\t\t\t\ton pi.person_image_id = piu.person_image_id\n\t\t\t\tand piu.person_image_usage = 'corpdirectory'\n\t\t    ) pi USING (person_id)\n\t\tLEFT JOIN (\n\t\t       select manager_person_id as person_id, count(*)  as tally\n\t\t\t from person_company\n\t\t\t where person_company_status = 'enabled'\n\t\t\t group by manager_person_id\n\t\t) numreports USING (person_id)\n\t\tLEFT JOIN (\n\t\t    select  pl.person_id,\n\t\t\tpa.physical_address_id,\n\t\t\tpa.display_label,\n\t\t\tpl.building,\n\t\t\tpl.floor,\n\t\t\tpl.section,\n\t\t\tpl.seat_number\n\t\t    from   person_location pl\n\t\t\tinner join physical_address pa\n\t\t\t    USING (physical_address_id)\n\t\t    where   pl.person_location_type = 'office'\n\t\t    order by site_rank\n\t\t) ofc USING (person_id)\n\t\tLEFT JOIN person mgrp\n\t\t    on pc.manager_person_id = mgrp.person_id\n\tWHERE p.person_id = \$1 \n\tAND (pc.hire_date is null or pc.hire_date <= now())\n\tAND a.account_role = 'primary'\n\tORDER BY ac.account_collection_name\n;\n";
$result = pg_query_params($dbconn, $query, array($personid)) or die('Query failed: ' . pg_last_error());
$row = pg_fetch_array($result, null, PGSQL_ASSOC) or die("no person");
if ($row['login'] == $_SERVER['REMOTE_USER'] || check_admin($dbconn, $_SERVER['REMOTE_USER'])) {
    $canedit = 1;
} else {
    $canedit = 0;
}
$name = $row['first_name'] . " " . $row['last_name'];
$title = $row['position_title'];
$teamc = " (" . $row['company_name'] . ")";
if (isset($row['mgr_last_name'])) {
    $manager = $row['mgr_first_name'] . " " . $row['mgr_last_name'];
}
echo build_header($name);
echo browsingMenu($dbconn, null);
if (isset($_GET['random']) && $_GET['random'] == 'yes') {
    echo "<div id=random> <a href=\"./?index=random\"> Another Random Person </a> </div>\n";
}
echo "<div class=directorypic>" . img($row['person_id'], $row['person_image_id'], 'contact') . "</div>";
echo "<div class=\"description\">";
echo "<h1> {$name} </h1>";
if (isset($row['nickname']) && strtolower($row['nickname']) != strtolower($row['first_name'])) {
    echo "AKA ", $row['nickname'], " </br>\n";
}
echo "<table id=\"contact\">\n";
if (isset($row['num_reports']) && $row['num_reports'] > 0) {
    $title = "{$title} (" . hierlink('reports', $row['person_id'], "team") . ")";
}
if (isset($title)) {
コード例 #10
0
ファイル: events.php プロジェクト: JazzHandsCMDB/jazzhands
<?php

include "personlib.php";
$dbconn = dbauth::connect('directory', null, $_SERVER['REMOTE_USER']) or die("Could not connect: " . pg_last_error());
echo build_header("Events");
echo browsingMenu($dbconn, null, 'locations');
$address = isset($_GET['physical_address_id']) ? $_GET['physical_address_id'] : null;
$addrsubq = "";
if ($address) {
    $addrsubq = "AND officemap.physical_address_id = \$1";
}
$query = "\n\tWITH perlimit AS (\n\t\tSELECT\tperson_id, account_collection_name as restrict\n\t\tFROM\tv_corp_family_account\n\t\t\t\tINNER JOIN account_collection_account USING (account_id)\n\t\t\t\tINNER JOIN account_collection USING (account_collection_id)\n\t\tWHERE\taccount_collection_type = 'system'\n\t\tAND\t\taccount_collection_name IN\n\t\t\t\t('noeventsbirthday', 'noeventsanniversary')\n\t), birthdaycompanyok AS (\n\t\tSELECT\ts.site_code, company_id\n\t\tFROM\tsite s\n\t\t\t\tINNER JOIN property p on s.colo_company_id = p.company_id\n\t\tWHERE\tp.property_name = 'ShowBirthday'\n\t\tAND\t\tp.property_type = 'PhoneDirectoryAttributes'\n\t), officemap AS (\n\t    select  pa.physical_address_id,\n\t\t\t\tpl.person_id,\n\t\t\t\tpa.display_label,\n\t\t\t\tpa.company_id,\n\t\t\t\tpl.building,\n\t\t\t\tpl.floor,\n\t\t\t\tpl.section,\n\t\t\t\tpl.seat_number\n\t    from   person_location pl\n\t\t\t\tinner join physical_address pa\n\t\t\t\t\tUSING (physical_address_id)\n\t    where   pl.person_location_type = 'office'\n\t    order by site_rank\n\t), anniversary AS (\n\t\tselect\tp.person_id,\n\t\t\tcoalesce(p.preferred_first_name, p.first_name) as first_name,\n\t\t\tcoalesce(p.preferred_last_name, p.last_name) as last_name,\n\t\t\tdate_part('epoch', pc.hire_date) as whence,\n\t\t\tpc.hire_date as whence_human,\n\t\t\t'Hire Date'::text as event,\n            CASE WHEN pc.hire_date IS NOT NULL THEN\n\t\t\tround(extract('epoch' FROM (select\n\t\t\t\t\tdate_trunc('year',now()) - date_trunc('year',pc.hire_date)\n\t\t\t))/86400/365) ELSE NULL END AS duration\n\t \tfrom\tperson_company pc\n\t\tjoin    person p using (person_id)\n\t\twhere   pc.hire_date is not null and pc.hire_date <= now()\n\t\tAND person_id NOT IN (\n\t\t\tSELECT person_id\n\t\t\tFROM perlimit\n\t\t\tWHERE restrict = 'noeventsanniversary'\n\t\t)\n\t), birthdays AS (\n\t\tselect p.person_Id,\n\t\t\tcoalesce(p.preferred_first_name, p.first_name) as first_name,\n\t\t\tcoalesce(p.preferred_last_name, p.last_name) as last_name,\n\t\t\tdate_part('epoch', p.birth_date) as whence,\n\t\t\tp.birth_date as whence_human,\n\t\t\t'Birthday'::text as event,\n\t\t\tNULL::numeric as duration\n\t\tFROM\tperson p\n\t\t\tINNER JOIN officemap USING (person_id)\n\t\t\tINNER JOIN birthdaycompanyok USING (company_id)\n\t\tWHERE\tp.birth_date is not null\n\t\tAND person_id NOT IN (\n\t\t\tSELECT person_id\n\t\t\tFROM perlimit\n\t\t\tWHERE restrict = 'noeventsbirthday'\n\t\t)\n\t), events AS (\n\t\tSELECT * FROM anniversary UNION SELECT * FROM birthdays\n\t) SELECT events.*, officemap.display_label as office_location\n\t\tFROM events\n\t\tINNER JOIN (\n\t\t\tSELECT * from person_company\n\t\t\tWHERE hire_date is null or hire_date <= now()\n\t\t) pc USING (person_id)\n\t\tINNER JOIN v_corp_family_account vcfa USING (person_id, company_id)\n\t\tLEFT JOIN officemap USING (person_id)\n\tWHERE   \n\tpc.person_company_relation = 'employee'\n\tAND vcfa.is_enabled = 'Y'\n    {$addrsubq}\n\tORDER BY date_part('month', whence_human),\n\t\tdate_part('day', whence_human),\n\t\tlast_name,\n\t\tfirst_name,\n\t\tevent\n";
if ($address) {
    $params = array($address);
} else {
    $params = array();
}
$result = pg_query_params($dbconn, $query, $params) or die('Query failed: ' . pg_last_error());
echo "<table class=events>\n";
$last_month = "";
while ($row = pg_fetch_array($result, null, PGSQL_ASSOC)) {
    $name = $row['first_name'] . " " . $row['last_name'];
    $name = personlink($row['person_id'], $name);
    $mon = date("F", $row['whence']);
    $event = $row['event'];
    if ($mon != $last_month) {
        $last_month = $mon;
        echo "<tr class=month> <td colspan=5> {$mon} </td> </tr>\n";
    }
    if ($event != 'Birthday') {
        $printable = date("F j, Y", $row['whence']);
コード例 #11
0
ファイル: yearbook.php プロジェクト: JazzHandsCMDB/jazzhands
    $wherextra = "and p.person_id = \$" . $argoffset++;
    array_push($args, $personid);
}
$address = $_GET['physical_address_id'] ? $_GET['physical_address_id'] : null;
if ($address) {
    $wherextra .= " and  ofc.physical_address_id = \$" . $argoffset++;
    array_push($args, $address);
}
error_log("address is {$address}");
$query = "\n\tselect  p.person_id,\n\t\tcoalesce(p.preferred_first_name, p.first_name) as first_name,\n\t\tcoalesce(p.preferred_last_name, p.last_name) as last_name,\n\t\tcoalesce(pc.nickname, p.nickname) as nickname,\n\t\tpc.position_title,\n\t\tpi.person_image_id,\n\t\tpi.description\n\t   from person p\n\t   \tinner join person_company pc\n\t\t\tusing (person_id)\n\t   \tinner join company c\n\t\t\tusing (company_id)\n\t\tinner join v_corp_family_account a\n\t\t\ton p.person_id = a.person_id\n\t\t\tand pc.company_id = a.company_id\n\t\t\tand a.account_role = 'primary'\n\t\tinner join account_collection_account uc\n\t\t\ton uc.account_id = a.account_id\n\t\tinner join account_collection u\n\t\t\ton u.account_collection_id = uc.account_collection_id\n\t\t\tand u.account_collection_type = 'department'\n\t\tinner join person_image pi\n\t\t\ton pi.person_id = p.person_id\n\t\tinner join person_image_usage piu\n\t\t\ton pi.person_image_id = piu.person_image_id\n\t\t\t\tand piu.person_image_usage = 'yearbook'\n\t       left join (\n\t\t\tselect pl.person_id, pa.physical_address_id,\n\t\t\t\tpa.display_label\n\t\t\t from   person_location pl\n\t\t\t\tinner join physical_address pa\n\t\t\t\t\ton pl.physical_address_id = \n\t\t\t\t\t\tpa.physical_address_id\n\t\t\twhere   pl.person_location_type = 'office'\n\t\t\torder by site_rank\n\t\t\t) ofc on ofc.person_id = p.person_id\n\t\twhere\tpc.person_company_status = 'enabled'\n\t\t\t{$wherextra}\n\t\torder by pc.hire_date\n";
if (strlen($wherextra) > 0) {
    $result = pg_query_params($query, $args) or die("Query {$query} == {$personid} failed: " . pg_last_error());
} else {
    $result = pg_query($query) or die("Query {$query} failed: " . pg_last_error());
}
echo build_header("Yearbook", null, "Yearbook");
echo browsingMenu($dbconn, null, 'locations');
$first = 0;
while ($row = pg_fetch_array($result, null, PGSQL_ASSOC)) {
    // only print the header if there are rows.
    if ($first == 0) {
        $first++;
        if (!isset($personid)) {
            ?>
			<table id=yearbook>
				<tr>
					<td> Name </td> 
					<td> Photo </td> 
					<td> Most Likely To... </td> 
				</tr>
			<?php 
コード例 #12
0
<?php

/*********************************************
/* Search Script for GiantDisc Server
   written by Andreas Baierl in 2009

   Project Homepage: http://sourceforge.net/projects/gdrestfulwebint/
   Help: http://sourceforge.net/apps/mediawiki/gdrestfulwebint/index.php

*/
require_once "includes/inc.includes.php";
// Include necessary files
$limit = null;
build_header("Search");
?>
<script>
	$(document).ready(function(){
		$autocomplete = $('<ul id="autocomplete" class="autocomplete"></ul>')
		.hide()
		.insertAfter('#search_form');
		
		var selectedItem = null;
		var setSelectedItem = function(item) {
			selectedItem = item;
			if (selectedItem === null) {
				$autocomplete.hide();
				return;
			}
			if (selectedItem < 0) {
				selectedItem = 0;
			}
コード例 #13
0
<?php

/*********************************************
/* Import Script for GiantDisc Server
   written by Andreas Baierl in 2009

   Project Homepage: http://sourceforge.net/projects/gdrestfulwebint/
   Help: http://sourceforge.net/apps/mediawiki/gdrestfulwebint/index.php!

*/
require_once "includes/inc.includes.php";
// Include necessary files
build_header("Import");
build_body("Import");
// print the main top menu
print "<div class='browsemenu'>\n";
$sel = strcmp($_GET['level0'], "albums") == 0 ? "" : "in";
print "<div class=\"browsemenuitem" . $sel . "active\"><a href=\"import.php?level0=albums\">Import Albums</a></div>\n";
$sel = strcmp($_GET['level0'], "singles") == 0 ? "" : "in";
print "<div class=\"browsemenuitem" . $sel . "active\"><a href=\"import.php?level0=singles\">Import Singles</a></div>\n";
print "</div>\n";
print "<div class='results'>\n";
print "<div class='searchresults'>\n";
/*************************************
   Create tables with ID3-Tags
   Possibility to edit and change track-details
**************************************/
// **************************************************
// Table Single Tracks
// is created, if directory "inbox" (single tracks) are selected
//