コード例 #1
0
ファイル: view.php プロジェクト: athenasystems/athena
$pagetitle = "Contacts";
$navtitle = 'Contacts';
$keywords = '';
$description = '';
include "/srv/athenace/lib/shared/common.php";
include "/srv/athenace/lib/intranet/common.php";
include "/srv/athenace/lib/shared/functions_form.php";
$pagetitle = "Contacts";
include "../tmpl/header.php";
?>

<h1>Contacts</h1>

<?php 
if (isset($_GET['id']) && is_numeric($_GET['id'])) {
    $sqltext = "SELECT * FROM contacts,address WHERE contacts.addsid=address.addsid AND contactsid=?";
    // print $sqltext;
    $q = $db->select($sqltext, array($_GET['id']), 'i');
    $r = $q[0];
    tablerow("Name", $r->fname . ' ' . $r->sname);
    tablerow("Company Name", $r->co_name);
    tablerow("Role", $r->role);
    tablerow("Notes", $r->notes);
    $addsid = $r->addsid;
    $adds = getAddress($r->addsid);
    include "/srv/athenace/lib/shared/adds.view.php";
}
?>

<?php 
include "../tmpl/footer.php";
コード例 #2
0
ファイル: bobbforms.php プロジェクト: bobbingwide/oik-lib
 /**
  * Create a textarea field
  *
  * @TODO Confirm this is used
  */
 function textarea($name, $len, $text, $value, $rows = 10, $args)
 {
     $lab = label($name, $text);
     $itext = iarea($name, $len, $value, $rows);
     tablerow($lab, $itext);
     return;
 }
コード例 #3
0
 function last_names($max)
 {
     global $dbh, $tree_id, $language, $user, $humo_option, $uri_path, $freq_last_names, $freq_pers_prefix, $freq_count_last_names, $maxcols;
     $personqry = "SELECT pers_lastname, pers_prefix,\n\t\t\t\tCONCAT(pers_prefix,pers_lastname) as long_name, count(pers_lastname) as count_last_names\n\t\t\t\tFROM humo_persons\n\t\t\t\tWHERE pers_tree_id='" . $tree_id . "' AND pers_lastname NOT LIKE ''\n\t\t\t\tGROUP BY long_name ORDER BY count_last_names DESC LIMIT 0," . $max;
     $person = $dbh->query($personqry);
     while (@($personDb = $person->fetch(PDO::FETCH_OBJ))) {
         $freq_last_names[] = $personDb->pers_lastname;
         $freq_pers_prefix[] = $personDb->pers_prefix;
         $freq_count_last_names[] = $personDb->count_last_names;
     }
     $row = round(count($freq_last_names) / $maxcols);
     for ($i = 0; $i < $row; $i++) {
         echo '<tr>';
         for ($n = 0; $n < $maxcols; $n++) {
             if ($n == $maxcols - 1) {
                 tablerow($i + $row * $n, true);
                 // last col
             } else {
                 tablerow($i + $row * $n);
                 // other cols
             }
         }
         echo '</tr>';
     }
     return $freq_count_last_names[0];
 }
コード例 #4
0
ファイル: adds.view.php プロジェクト: athenasystems/athena
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
echo '<h3>Contact Details</h3>';
tablerow('Tel', $adds->tel);
tablerow('Fax', $adds->fax);
tablerow('Email', $adds->email);
tablerow('Web', $adds->web);
echo '<h3>Address</h3>';
tablerow('Address', $adds->add1);
if (isset($adds->add2) && $adds->add2 != '') {
    tablerow('&nbsp;', $adds->add2);
}
if (isset($adds->add3) && $adds->add3 != '') {
    tablerow('&nbsp;', $adds->add3);
}
tablerow('City', $adds->city);
tablerow('County', $adds->county);
tablerow('Country', $adds->country);
tablerow('Postcode', $adds->postcode);
コード例 #5
0
ファイル: view.php プロジェクト: athenasystems/athena
    ?>

<h1>
	Quote No:
	<?php 
    echo $r->quotesid;
    ?>
	for
	<?php 
    echo $r->co_name;
    ?>
</h1>

<?php 
    tablerow("Date", $quotedate);
    tablerow("Quote Description", stripslashes($r->content));
    ?>

<div style="text-align: right; font-weight: bold; width: 800px;">
	Quote Total Price: &pound;
	<?php 
    echo $r->price;
    ?>
</div>

<?php 
    if (!$r->agree) {
        ?>
<form class="focusfirst"
	action="<?php 
        echo $_SERVER['PHP_SELF'];
コード例 #6
0
ファイル: view.php プロジェクト: athenasystems/athena
	<?php 
echo $r->co_name;
?>

</h1>

<?php 
if ($r->live) {
    $status = '<span style="color:green">This Quote is Live</span>';
} else {
    $status = '<span style="color:brown">This Quote is not Live</span>';
}
tablerow("Quote Status", '<a href="/quotes/status?id=' . $r->quotesid . '" title="Click to change Quote Status">' . $status . '</a>');
tablerow("Date", $quotedate);
tablerow("Quote Description", stripslashes($r->content));
tablerow("Notes", stripslashes($r->notes));
?>
<br>
<br>

<div class="clearfix"></div>
<br>

<br clear="all">

<br>
<div style="text-align: right; font-weight: bold; width: 800px;">
	Quote Total Price: &pound;
	<?php 
echo $r->price;
?>
コード例 #7
0
ファイル: view.php プロジェクト: athenasystems/athena
include "/srv/athenace/lib/shared/adds.view.php";
$invContact = '';
if (isset($r->inv_contact) && $r->inv_contact != '' && $r->inv_contact > 0) {
    $invContact = getCustExtName($r->inv_contact);
    tablerow('Invoice Contact', $invContact);
}
?>

<h3><?php 
echo $r->co_name;
?>
 Staff</h3>


<?php 
$sqltext2 = "SELECT * FROM contacts WHERE custid=?";
// print "<br>$sqltext2";
$qq = $db->select($sqltext2, array($_GET['id']), 'i');
foreach ($qq as $rr) {
    $staffHTML = <<<EOF
<a\thref="/contacts/edit.php?id={$rr->contactsid}" title="Edit External Customer Contact">
<strong>{$rr->fname} {$rr->sname}</strong></a>
EOF;
    tablerow('Contact', $staffHTML);
}
?>

<br clear=all>

<?php 
include "../tmpl/footer.php";
コード例 #8
0
function last_names($max)
{
    global $dbh, $tree_id, $language, $user, $humo_option, $uri_path, $freq_last_names, $freq_pers_prefix, $freq_count_last_names, $maxcols;
    global $last_name;
    //$personqry="SELECT pers_lastname, pers_prefix,
    //	CONCAT(pers_prefix,pers_lastname) as long_name, count(pers_lastname) as count_last_names
    //	FROM humo_persons
    //	WHERE pers_tree_id='".$tree_id."' AND pers_lastname NOT LIKE ''
    //	GROUP BY long_name ORDER BY count_last_names DESC LIMIT 0,".$max;
    // Mons, van or: van Mons
    if ($user['group_kindindex'] == "j") {
        $personqry = "SELECT pers_lastname, pers_prefix,\n\t\t\tCONCAT(pers_prefix,pers_lastname) as long_name, count(pers_lastname) as count_last_names\n\t\t\tFROM humo_persons\n\t\t\tWHERE pers_tree_id='" . $tree_id . "' AND CONCAT(pers_prefix,pers_lastname) LIKE '" . $last_name . "%'\n\t\t\tGROUP BY long_name LIMIT 0," . $max;
        if ($last_name == 'all') {
            $personqry = "SELECT pers_lastname, pers_prefix,\n\t\t\t\tCONCAT(pers_prefix,pers_lastname) as long_name, count(pers_lastname) as count_last_names\n\t\t\t\tFROM humo_persons WHERE pers_tree_id='" . $tree_id . "' GROUP BY long_name LIMIT 0," . $max;
        }
    } else {
        // *** Select alphabet first_character ***
        $personqry = "SELECT pers_lastname, pers_prefix,\n\t\t\tCONCAT(pers_lastname,pers_prefix) as long_name, count(pers_lastname) as count_last_names\n\t\t\tFROM humo_persons\n\t\t\tWHERE pers_tree_id='" . $tree_id . "' AND pers_lastname LIKE '" . $last_name . "%'\n\t\t\tGROUP BY long_name LIMIT 0," . $max;
        if ($last_name == 'all') {
            $personqry = "SELECT pers_lastname, pers_prefix,\n\t\t\tCONCAT(pers_lastname,pers_prefix) as long_name, count(pers_lastname) as count_last_names\n\t\t\tFROM humo_persons WHERE pers_tree_id='" . $tree_id . "'\n\t\t\tGROUP BY long_name LIMIT 0," . $max;
        }
    }
    $person = $dbh->query($personqry);
    while (@($personDb = $person->fetch(PDO::FETCH_OBJ))) {
        if ($personDb->pers_lastname == '') {
            $personDb->pers_lastname = '...';
        }
        $freq_last_names[] = $personDb->pers_lastname;
        $freq_pers_prefix[] = $personDb->pers_prefix;
        $freq_count_last_names[] = $personDb->count_last_names;
    }
    //$row = round(count($freq_last_names)/$maxcols);
    $row = ceil(count($freq_last_names) / $maxcols);
    for ($i = 0; $i < $row; $i++) {
        echo '<tr>';
        for ($n = 0; $n < $maxcols; $n++) {
            if ($n == $maxcols - 1) {
                tablerow($i + $row * $n, true);
                // last col
            } else {
                tablerow($i + $row * $n);
                // other cols
            }
        }
        echo '</tr>';
    }
    return $freq_count_last_names[0];
}