* You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 */
require_once('includes/common.php');
require_once('includes/SI_ProjectStatus.php');

checkLogin("admin");

$project_status = new SI_ProjectStatus();
$project_statuses = $project_status->retrieveSet();
if($project_statuses === FALSE){
	$error_msg .= "Error getting project statuses!\n";
	debug_message($project_status->getLastError());
}

$title = "Project Status Administration";

require('header.php') ?>
<div class="tableContainer">
<a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" />Project Statuses</a><div>
	<div class="gridToolbar">
		  <a href="project_status.php?mode=add" style="background-image:url(images/new_invoice.png);">New Project Status</a>
	</div>
		<table border="0" cellspacing="0" cellpadding="0">
			<tr>
				<th><a href="" onclick="return sortTable('bodyId', 0, 1, false)">ID</a></th>
				<th><a href="" onclick="return sortTable('bodyId', 1, 1, false)">Name</a></th>
				<th><a href="" onclick="return sortTable('bodyId', 2, 1, false)">Completed</a></th>
示例#2
0
				$error_msg .= "Error adding user transaction";
				debug_message($ut->getLastError());
			}else{
				$check->trans_id = $ut->id;
				if($check->update() === FALSE){
					$error_msg .= "Error updating transaction id for check";
					debug_message($check->getLastError());
				}
			}
			
			if(empty($error_msg)){
				goBack();
			}
		}else{
			$error_msg .= "Error adding Check!\n";
			debug_message($check->getLastError());
		}
	}
}

$url = $_SERVER['PHP_SELF']."?user_id=".$_REQUEST['user_id']."&";
$_REQUEST['detail'] = strtolower(substr($_REQUEST['detail'],0,1)) == "y" ? TRUE : FALSE;
$title = "Create Check";
$total_time = 0;

require('header.php') ?>
<FORM ACTION="<?php 
echo $_SERVER['PHP_SELF'];
?>
" METHOD="POST" NAME="chk">
<div class="tableContainer">
			}else{
				$error_msg .= "Error deleting Payment Schedule!\n";
			}
		}else{
			goBack();
		}
	}
}else{
	fatal_error("Invalid mode ({$_REQUEST['mode']}) for this page!");
}

$company =& $project->getCompany();
$item_codes = $item_code->getCompanyPricedCodes($company->id);
if($item_codes === FALSE){
	$error_msg .= "Could not get item codes for company!\n";
	debug_message($item_code->getLastError());	
}
?>
<? require('header.php'); ?>
<script>
	function ItemCode(id, description, cost, price){
		this.id = id;
		this.description = description;
		this.cost = cost;
		this.price = price;	
	}
	
	var item_prices = new Array();
<?	for($i = 0; $i <= count($item_codes); $i++){
		if(!empty($item_codes[$i]->id)){
			print("item_prices[".$item_codes[$i]->id."] = new ItemCode(\"".$item_codes[$i]->id."\",\"".$item_codes[$i]->description."\", \"".$item_codes[$i]->cost."\", \"".$item_codes[$i]->price."\");\n");
示例#4
0
	if($_POST['save']){
		$company->updateFromAssocArray($_POST);
		if($company->update()){
			goBack();
		}else{
			$error_msg .= "Error updating Company!\n";
			debug_message($company->getLastError());
		}
	}
}else if($_REQUEST['mode'] == 'delete'){
	$title = "Delete Company";

	if(!$company->get($_REQUEST['id'])){
		$error_msg .= "Error retrieving company information!\n";
		debug_message($company->getLastError());
	}

	if($_POST['confirm']){
		if($_POST['confirm'] == "Yes"){
			if($company->delete($_REQUEST['id'])){
				goBack();
			}else{
				$error_msg .= "Error deleting Company!\n";
			}
		}else{
			goBack();
		}
	}
}else{
	$title = "Invalid Mode";
示例#5
0
    $propertyAddress2 = join($arr_property_address2, ' ');
    $arr_property_details = array('propertyID' => $property_id, 'versionID' => 1, 'languageID' => 1, 'propertyName' => $property_name, 'propertyAddress1' => $result['address'], 'propertyAddress2' => $propertyAddress2, 'propertyDescription' => $propertyDescription, 'propertyLocality' => $ap_details[0]['locality'], 'propertyMetaTitle' => $propertyDescription, 'propertyMetaKeyword' => $propertyDescription, 'propertyMetaDescription' => $propertyDescription, 'propertyShortDescription' => $propertyDescription, 'propertySpecifications' => $property_name, 'propertyCurrentStatus' => '');
    $arr_property_prices = array('propertyID' => $property_id, 'currencyID' => 3, 'propertyPrice' => $ap_details[0]['rentAmount']);
    $app_data = array();
    // Get appointment mapping
    $app_data['app_details'] = $ap_details;
    $app_data['app_kitchens'] = $ak_details;
    $app_data['app_images'] = $ai_details;
    $app_data['app_livingroom'] = $al_details;
    $app_data['app_toilets'] = $at_details;
    $app_data['app_bedrooms'] = $ab_details;
    //$app_data['app_washdry_area'] = $aw_details;
    $attributes_map = $ob_map->get_attributes_map();
    $attributes = $ob_property->prepare_property_attributes($attributes_map, $app_data);
    $amenities_map = $ob_map->get_amenities_map();
    $amenities = $ob_property->prepare_property_amenities($amenities_map, $app_data);
    // Save all amenities
    $ob_property::save_amenities($property_id, $amenities);
    debug_message('Create data for property data.');
    $property_details_id = $ob_property::save_data('rp_property_details', $arr_property_details);
    $property_price_id = $ob_property::save_data('rp_property_price', $arr_property_prices);
    // Save all attributes
    $ob_property::save_attributes($property_id, $attributes);
    // Update the property appointment relationship
    $ob_appointment::save_data('rp_appointment_property', array('APID' => $result['appointmentID'], 'LPID' => $property_id));
    $ob_log->write("A new property with id {$property_id} is created.");
}
$app_db = NULL;
$admin_dbh = NULL;
$ob_log->write("Script execution complete.");
exit('Script execution complete.');
示例#6
0
                    $error_msg .= "Error updating user rights!\n";
                    debug_message($user->getLastError());
                }
            } else {
                $error_msg .= "Error updating User!\n";
                debug_message($user->getLastError());
            }
        }
    } else {
        if ($_REQUEST['mode'] == 'delete') {
            $title = "Delete User";
            if ($user->delete($_REQUEST['id'])) {
                goBack();
            } else {
                $error_msg .= "Error deleting User!\n";
                debug_message($user->getLastError());
            }
        } else {
            $title = "Invalid Mode";
            $error_msg .= "Error: Invalid mode!\n";
        }
    }
}
$js_onLoad = "setRateType()";
require 'header.php';
?>
<script>
function setRateType(){
	var rate_type = document.user.rate_type.options[document.user.rate_type.selectedIndex].value;
	if(rate_type == 'SALARY'){
		document.user.salary.disabled = false;
示例#7
0
            }
            if (count($ex_ids) > 0) {
                if ($invoice->addExpenses($ex_ids, SI_EXPENSE_AGGREGATION_DESC) === FALSE) {
                    $error_msg .= "Error adding expenses to invoice!\n";
                    debug_message($invoice->getLastError());
                }
            }
            // Add the company transaction
            if (empty($error_msg)) {
                $ct = new SI_CompanyTransaction();
                $ct->amount = $invoice->getTotal();
                $ct->company_id = $invoice->company_id;
                $ct->description = "Invoice #" . $invoice->id;
                $ct->timestamp = $invoice->timestamp;
                if ($ct->add() === FALSE) {
                    $error_msg .= "Error adding company transaction!\n";
                    debug_message($ct->getLastError());
                }
                $invoice->trans_id = $ct->id;
                if ($invoice->update() === FALSE) {
                    $error_msg .= "Error updating invoice with company transaction id!\n";
                    debug_message($invoice->getLastError());
                }
            }
        } else {
            $echo("Error adding Invoice!\n");
            debug_message($invoice->getLastError());
        }
    }
}
echo "\n\nEnd of AutoInvoice.\n";
示例#8
0
	if($_POST['save']){
		$account->updateFromAssocArray($_POST);
		if($account->update()){
			goBack();
		}else{
			$error_msg .= "Error updating Account!\n";
			debug_message($account->getLastError());
		}
	}
}else if($_REQUEST['mode'] == 'delete'){
	$title = "Delete Account";

	if(!$account->get($_REQUEST['id'])){
		$error_msg .= "Error retrieving account information!\n";
		debug_message($account->getLastError());
	}

	if($_POST['confirm']){
		if($_POST['confirm'] == "Yes"){
			if($account->delete($_REQUEST['id'])){
				goBack();
			}else{
				$error_msg .= "Error deleting Account!\n";
			}
		}else{
			goBack();
		}
	}
}else{
	$title = "Invalid Mode";
示例#9
0
	debug_message($task_status->getLastError());
}


$title = "Priority & Status Configuration";

if($_POST['save']){
	if(is_array($_POST['params'])){
		foreach($_POST['params'] as $param_name => $param_value){
			if(!empty($param_name)){
				$modified_config = new SI_Config();
				$modified_config->name = $param_name;
				$modified_config->value = $param_value;
				if($modified_config->update() === FALSE){
					$error_msg .= "Error updating configuration paramenter: $param_name\n";
					debug_message($modified_config->getLastError());
					break;
				}
			}
		}
	}
	if(empty($error_msg)){
		header("Location: ".getCurrentURL()."\r\n");
		exit();
	}
}

require('header.php') ?>
<form action="<?php 
echo $_SERVER['PHP_SELF'];
?>
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 */
require_once('includes/common.php');
require_once('includes/SI_ProjectPriority.php');

checkLogin("admin");

$project_priority = new SI_ProjectPriority();
$project_prioirities = SI_ProjectPriority::retrieveSet();
if($project_prioirities === FALSE){
	$error_msg .= "Error getting project priorities!\n";
	debug_message($project_priority->getLastError());
}

$title = "Project Priority Administration";

require('header.php') ?>
<div class="tableContainer">
<a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" />Project Priorities</a><div>
	<div class="gridToolbar">
		  <a href="project_priority.php?mode=add" style="background-image:url(images/new_invoice.png);">New Project Priority</a>
	</div>
<table border="0" cellspacing="0" cellpadding="0">
	<tr>
		<th><a href="" onclick="return sortTable('bodyId', 0, 1, false)">ID</a></th>
		<th><a href="" onclick="return sortTable('bodyId', 1, 1, false)">Name</a></th>
		<th><a href="" onclick="return sortTable('bodyId', 2, 1, false)">Level</a></th>
 /**
  * Returns the node at the end of the path $path.
  * @deprecated
  * @since 0.1.4
  * @param $path The path to the node (can be an array), separated by '/' (not needed if an array)
  * @param $separator The separator between the segments, default: '/'
  * @param $root The lft of the node to be root in the query, default: 1
  * @note The path to the rootnode is only a '/', so
  * the path to a child is '/childtitle', and to a grandchild:
  * '/childtitle/grandchildtitle'
  * @return An array with the requested node's data
  */
 function xpath2($path, $separator = '/', $root = 1)
 {
     if (is_array($path)) {
         $segments = $path;
     } else {
         // split the segments
         $segments = explode($separator, $path);
     }
     // load the rootnode
     $this->db->select($this->left_col . ', ' . $this->right_col);
     $query = $this->db->get_where($this->tree_table, array($this->left_col => $root));
     if (!$query->num_rows()) {
         debug_message('xpath2() cannot find node with ' . $this->left_col . ': ' . $root . ', aborting xpath2().');
         return false;
     }
     $current_node = $query->row_array();
     // iterate the segments
     foreach ($segments as $part) {
         if ($part != null || $part != '') {
             // We have a segment, try to match it to the children
             // Almost the same as in get_children_where(), but it selects only the needed data (lft and title)
             $this->db->select('*');
             // Circumvent the db escaping to enable a subquery
             $this->db->ar_from[] = "(SELECT node.{$this->left_col},\r\nnode.{$this->title_col}, (COUNT(parent.{$this->id_col}) - (sub_tree.depth + 1)) AS depth\r\nFROM {$this->tree_table} AS node,\r\n{$this->tree_table} AS parent,\r\n{$this->tree_table} AS sub_parent,\r\n(\r\n\tSELECT node.{$this->id_col}, (COUNT(parent.{$this->id_col}) - 1) AS depth\r\n\tFROM {$this->tree_table} AS node,\r\n\t{$this->tree_table} AS parent\r\n\tWHERE node.{$this->left_col} BETWEEN parent.{$this->left_col}\r\n\t\tAND parent.{$this->right_col} AND node.{$this->left_col} = {$current_node[$this->left_col]}\r\n\tGROUP BY node.{$this->id_col}\r\n\tORDER BY node.{$this->left_col}\r\n)AS sub_tree\r\nWHERE node.{$this->left_col} BETWEEN parent.{$this->left_col} AND parent.{$this->right_col}\r\n\tAND node.{$this->left_col} BETWEEN sub_parent.{$this->left_col} AND sub_parent.{$this->right_col}\r\n\tAND sub_parent.{$this->id_col} = sub_tree.{$this->id_col}\r\nGROUP BY node.{$this->id_col}\r\nHAVING depth = 1\r\nORDER BY node.{$this->left_col}) as a";
             $this->db->where($this->title_col, $part);
             $query = $this->db->get();
             // Have we got a result?
             if (!$query->num_rows()) {
                 debug_message('xpath2() cannot find node with ' . $this->title_col . ' : ' . $part . ' in path:' . $path . ', aborting.');
                 return false;
             }
             $current_node = $query->row_array();
         }
     }
     return $this->get_node($current_node[$this->left_col]);
 }
示例#12
0
function debug_echo($cmd, $msg)
{
    return debug_message($cmd, $msg, 'echo');
}
示例#13
0
		} else {
			//display the project name only
			$labels[$act->_task->project_id] = $act->project_name;
		}
	}else{
		$error_msg .= "Invalid report type!\n";
	}
}
$data_array = array();
$label_array = array();
foreach($data as $key => $item){
	$data_array[] = $item;
	$label_array[] = $labels[$key];
}
	
debug_message(print_r($data_array, TRUE).print_r($label_array,TRUE));
// Create the Pie Graph.
$graph = new PieGraph(500,325);
$graph->SetShadow();

// Set A title for the plot
$graph->title->Set($title);
#$graph->title->SetFont(FF_VERDANA,FS_BOLD,18); 
$graph->title->SetColor("darkblue");
//$graph->legend->Pos(0.1,0.2);

// Create pie plot
$p1 = new PiePlot3d($data_array);
$p1->SetTheme("earth");
$p1->SetCenter(0.35, 0.6);
$p1->SetAngle(30);
示例#14
0
 * http://www.gnu.org/copyleft/gpl.html
 *
 */
require_once('includes/common.php');
require_once('includes/SI_User.php');

checkLogin("admin");

require_once('includes/Notify.php');

$notification = new Notification();
$notifications = $notification->retrieveSet("ORDER BY name");
if($notifications === FALSE){
	$error_msg .= "Error getting notifications!\n";
	var_dump($notification);
	debug_message($notification->getLastError());
}

$title = "Notification Administration";

require('header.php') ?>
<div class="tableContainer">
<a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" />Notifications</a><div>
	<div class="gridToolbar">
		  <a href="notification.php?mode=add" style="background-image:url(images/new_invoice.png);">New Notification</a>
	</div>
<table border="0" cellspacing="0" cellpadding="0">
	<tr>
		<th><a href="" onclick="return sortTable('bodyId', 0, 1, false)">ID</a></th>
		<th><a href="" onclick="return sortTable('bodyId', 1, 1, false)">Name</a></th>
		<th><a href="" onclick="return sortTable('bodyId', 2, 1, false)">Active</a></th>
示例#15
0
    $maxItems = MAXIDS;
} else {
    exit("Check " . __FILE__ . " " . __LINE__ . ", there is something wrong.");
}
$maxrec = min($num_rows - $deliveredrecords, $maxItems);
if ($num_rows - $deliveredrecords > $maxItems) {
    $cursor = (int) $deliveredrecords + $maxItems;
    $restoken = createResumToken($cursor, $extquery, $metadataPrefix);
    $expirationdatetime = gmstrftime('%Y-%m-%dT%TZ', time() + TOKEN_VALID);
} elseif (isset($args['resumptionToken'])) {
    $restoken = $args['resumptionToken'];
    // just used as an indicator
    unset($expirationdatetime);
}
if (isset($args['resumptionToken'])) {
    debug_message("Try to resume because a resumptionToken supplied.");
    $record = $res->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_ABS, $deliveredrecords);
}
// Record counter
$countrec = 0;
// Publish a batch to $maxrec number of records
$outputObj = new ANDS_Response_XML($args);
while ($countrec++ < $maxrec) {
    $record = $res->fetch(PDO::FETCH_ASSOC);
    if ($record === false) {
        if (SHOW_QUERY_ERROR) {
            echo __FILE__ . "," . __LINE__ . "<br />";
            print_r($db->errorInfo());
            exit;
        }
    }
示例#16
0
		if($task_activity->hourly_rate === FALSE){
			$error_msg = "Error getting price for this item code!";
			debug_message($item_code->getLastError());
		}
		$sct = $task->getSalesCommissionType();
		$task_activity->sales_com_type_id = $sct->id;

		if($task_activity->add()){
			if($project->sendUpdateNotification(array("Added new task activity ".$GLOBALS['CONFIG']['url'].'/task_activity.php?mode=edit&id='.$task_activity->id)) === FALSE){
				$error_msg .= "Error sending update notification!\n";
				debug_message($project->getLastError());
			}

		}else{
			$error_msg .= "Error adding Task Activity!\n";
			debug_message($task_activity->getLastError());
		}
	}
}



require('header.php'); ?>
<script language="javascript">
YAHOO.util.Event.addListener(window, 'load', setupAutoComplete);

function setupAutoComplete(){
	for(i = 0; i < <?php 
echo $num_entries;
?>
; i++){
示例#17
0
}elseif(isset($_REQUEST['end_ts'])){
	$end_ts = $_REQUEST['end_ts'];
}else{
	$end_ts = mktime(23, 59, 59, date("n") + 1, 1, date("Y")) - (24 * 60 * 60);
}
$next_end_ts = mktime(0, 0, 0, date("n", $next_start_ts) + 1, 1, date("Y", $next_start_ts)) - (24 * 60 * 60);
$prev_end_ts = mktime(0, 0, 0, date("n", $prev_start_ts) + 1, 1, date("Y", $prev_start_ts)) - (24 * 60 * 60);


$next_month_url = $_SERVER['PHP_SELF']."?start_ts=$next_start_ts&end_ts=$next_end_ts&";
$prev_month_url = $_SERVER['PHP_SELF']."?start_ts=$prev_start_ts&end_ts=$prev_end_ts&";

$rows = $reports->salesByItemCode($start_ts, $end_ts);
if($rows === FALSE){
	$error_msg .= "Error getting report data!\n";
	debug_message($reports->getLastError());
}

?>
<? require('header.php'); ?>
<form action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" METHOD="GET">
<div class="tableContainer">
<a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" /><?php 
echo $title;
?>
</a><div>
<table border="0" cellspacing="0" cellpadding="0" class="form_table">
<tr>
示例#18
0
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 */
require_once('includes/common.php');
require_once('includes/SI_UserType.php');

checkLogin("admin");

$user_type = new SI_UserType();
$user_types = SI_UserType::retrieveSet();
if($user_types === FALSE){
	$error_msg = "Error getting user types!\n";
	debug_message($user_type->getLastError());
}

$title = "User Type Administration";

require('header.php') ?>
<div class="tableContainer">
<a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" />User types</a><div>
	<div class="gridToolbar">
		  <a href="user_type.php?mode=add" style="background-image:url(images/new_invoice.png);">New user type</a>
	</div>
		<table border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td><a href="" onclick="return sortTable('bodyId', 0, 1, false)">ID</a></td>
				<td><a href="" onclick="return sortTable('bodyId', 1, 1, false)">Name</a></td>
				<td><a href="" onclick="return sortTable('bodyId', 2, 1, false)">Resource</a></td>
示例#19
0
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 */
require_once('includes/common.php');
require_once('includes/SI_User.php');

checkLogin("admin");

require_once('includes/SI_RateStructure.php');

$rate_structure = new SI_RateStructure();
$rate_structures = $rate_structure->retrieveSet("ORDER BY name");
if($rate_structures === FALSE){
	$error_msg .= "Error getting rate structures!\n";
	debug_message($rate_structure->getLastError());
}

$title = "Rate Structure Administration";

require('header.php') ?>
<div class="tableContainer">
<a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" />Rate Structures</a><div>
	<div class="gridToolbar">
		  <a href="rate_structure.php?mode=add" style="background-image:url(images/new_invoice.png);">New Rate Structure</a>
	</div>
<table border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td><a href="" onclick="return sortTable('bodyId', 0, 1, false)">Name</a></td>
		<td>Edit</td>
		<td>Delete</td>		
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 */
require_once('includes/common.php');
require_once('includes/SI_User.php');

checkLogin("admin");

require_once('includes/SI_SalesCommissionType.php');

$com_type = new SI_SalesCommissionType();
$com_types = $com_type->retrieveSet("ORDER BY name");
if($com_types === FALSE){
	$error_msg .= "Error getting commission types!\n";
	debug_message($com_type->getLastError());
}

$title = "Sales Commission Type Administration";

require('header.php') ?>
<div class="tableContainer">
<a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" />Sales Commission Types</a><div>
	<div class="gridToolbar">
		  <a href="sales_comission_type.php?mode=add" style="background-image:url(images/new_invoice.png);">New Sales Commission Type</a>
	</div>
	<table border="0" cellspacing="0" cellpadding="0">
		<tr>
			<th><a href="" onclick="return sortTable('bodyId', 0, 1, false)">ID</a></th>
			<th><a href="" onclick="return sortTable('bodyId', 1, 1, false)">Name</a></th>
			<th>Edit</th>
示例#21
0
			fatal_error("Could not retreive project!");
			debug_message($project->getLastError());
		}
		if(!$project->hasRights(PROJECT_RIGHT_FULL)){
			fatal_error('Insufficent access rights for this project!');
		}
	}


	if($task->deleteAttachment($_REQUEST['attachment_id']) === FALSE){
		$error_msg .= "Error deleting attachment from project!\n";
		debug_message($task->getLastError());
	}
	if($project->sendUpdateNotification(array("Removed attachment ID ".$_REQUEST['attachment_id'])) === FALSE){
		$error_msg .= "Error sending update notification!\n";
		debug_message($project->getLastError());
	}
	$_REQUEST['mode'] = 'edit';

}else{
	fatal_error("Error: Invalid mode!\n");
}

?>
<? require('header.php'); ?>
<SCRIPT>
function disableCom(disableIt){
	document.task.sales_com_user_id.disabled = disableIt;
	document.task.sales_com_type_id.disabled = disableIt;
}
</SCRIPT>
示例#22
0
function loginUser($email, $password)
{
    $user = new SI_User();
    $login_user = $user->getUserByLogin($email, $password);
    if ($login_user === FALSE) {
        debug_message($user->getLastError());
        unset($_SESSION['userObj']);
        return FALSE;
    } else {
        $user->hasRight("admin");
        $_SESSION['userObj'] = $login_user;
        return TRUE;
    }
}
示例#23
0
}

$my_url = $_SERVER['PHP_SELF']."?task_id=".$task->id."&";

$_REQUEST['detail'] = strtolower(substr($_REQUEST['detail'],0,1)) == "y" ? TRUE : FALSE;

$title = "Time for ".$task->name;

$total_time = 0;

// Get this tasks payment schedule
$ps = new SI_PaymentSchedule();
$items = $ps->getForTask($task->id);
if($items === FALSE){
	$error_msg .= "Error getting scheduled billings for project!\n";
	debug_message($ps->getLastError());
}


require('header.php') ?>
<form action="batch_process.php" method="GET">
<input type="hidden" name="type" value="activity"/>  
<div class="tableContainer">
<a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)">
<img src="images/arrow_down.jpg" alt="Hide table" />Task Information</a><div>
<table border="0" cellspacing="0" cellpadding="0" class="form_table">
<tr>
	<td class="form_field_header_cell">Project Name:</td>
	<td class="form_field_cell">
		<?php 
echo $project->name;
示例#24
0
	debug_message($check->getLastError());
}

$ps = new SI_PaymentSchedule();
$time = time() + 30 * (24 * (60 * 60));
$ps_items = $ps->getUpcoming($time);
if($ps_items === FALSE){
	$error_msg .= "Could not retreive upcoming scheduled billings!\n";
	debug_message($ps->getLastError());
}

$expense = new SI_Expense();
$expenses = $expense->getUnbilled();
if($expenses === FALSE){
	$error_msg .= "Could not retreive unbilled expenses!\n";
	debug_message($expense->getLastError());
}
$title = "Accounting";

require('header.php'); ?>
<script>
function reloadPage(selObj){
	var user_id = selObj.options[selObj.selectedIndex].value;
	window.location.href = "<?php 
echo $_SERVER['PHP_SELF'];
?>
?filter=<?php 
echo $_REQUEST['filter'];
?>
&user_id="+user_id;
}
示例#25
0
if (is_array($METADATAFORMATS[$metadataPrefix]) && isset($METADATAFORMATS[$metadataPrefix]['myhandler'])) {
    $inc_record = $METADATAFORMATS[$metadataPrefix]['myhandler'];
    include $inc_record;
} else {
    $errors[] = oai_error('cannotDisseminateFormat', 'metadataPrefix', $metadataPrefix);
}
if (!empty($errors)) {
    oai_exit();
}
if (empty($errors)) {
    $query = selectallQuery($metadataPrefix) . $extquery . " ORDER BY " . $SQL['identifier'] . " ASC ";
    // workaround for mysql
    if (isset($deliveredrecords)) {
        $query .= " LIMIT " . MAXRECORDS . " OFFSET {$deliveredrecords} ";
    }
    debug_message("Query: {$query}");
    $res = $db->prepare($query, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));
    $r = $res->execute();
    if ($r === false) {
        if (SHOW_QUERY_ERROR) {
            echo __FILE__ . ',' . __LINE__ . "<br />";
            echo "Query: {$query}<br />\n";
            print_r($db->errorInfo());
            exit;
        } else {
            $errors[] = oai_error('noRecordsMatch');
        }
    } else {
        $r = $res->setFetchMode(PDO::FETCH_ASSOC);
        if ($r === false) {
            exit("FetchMode is not supported");
示例#26
0
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 */
require_once('includes/common.php');
require_once('includes/SI_TaskPriority.php');

checkLogin("admin");

$task_priority = new SI_TaskPriority();
$task_prioirities = $task_priority->retrieveSet();
if($task_prioirities === FALSE){
	$error_msg .= "Error getting list of task priorities!\n";
	debug_message($task_priority->getLastError());
}

$title = "Task Priority Administration";

require('header.php') ?>
<div class="tableContainer">
<a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" />Task priorities</a><div>
	<div class="gridToolbar">
		  <a href="task_priority.php?mode=add" style="background-image:url(images/new_invoice.png);">New Task Priority</a>
	</div>
<table border="0" cellspacing="0" cellpadding="0">
	<tr>
		<th><a href="" onclick="return sortTable('bodyId', 0, 1, false)">ID</a></th>
		<th><a href="" onclick="return sortTable('bodyId', 1, 1, false)">Name</a></th>
		<th><a href="" onclick="return sortTable('bodyId', 2, 1, false)">Level</a></th>
示例#27
0
}
// Create a new day
$day = new Day($_GET['y'], $_GET['m'], $_GET['d']);
// Get the task data
$task = new SI_Task();
$tasks = $task->getCalendarTasks($user_id, $day->getTimestamp(), $day->getTimestamp() + 24 * 60 * 60, 'hour');
if ($tasks === FALSE) {
    $error_msg .= "Could not retrieve Tasks!\n";
    debug_message($task->getLastError());
}
// Get the activity data
$ta = new SI_TaskActivity();
$activities = $ta->getCalendarActivities($user_id, $day->getTimestamp(), $day->getTimestamp() + 24 * 60 * 60, 'hour');
if ($activities === FALSE) {
    $error_msg .= "Could not retrieve activities!\n";
    debug_message($ta->getLastError());
}
// Make sure the current date is selected
$sHours = array(new Hour(date('Y'), date('m'), date('d'), date('H')));
// Build the hour list for that day
$day->build($sHours);
$title = "Calendar - Month View";
require 'header.php';
?>
<table class="dg_table" width="450">
	<TR>
		<TD COLSPAN="2" CLASS="dg_header_cell"><?php 
echo date('l F jS', $day->thisDay(true));
?>
</TD>
	</TR>
示例#28
0
/** Check if provided correct arguments for a request.
 *
 * Only number of parameters is checked.
 * metadataPrefix has to be checked before it is used.
 * set has to be checked before it is used.
 * resumptionToken has to be checked before it is used.
 * from and until can easily checked here because no extra information 
 * is needed.
 */
function checkArgs($args, $checkList)
{
    //	global $errors, $TOKEN_VALID, $METADATAFORMATS;
    global $errors, $METADATAFORMATS;
    //	$verb = $args['verb'];
    unset($args["verb"]);
    debug_print_r('checkList', $checkList);
    debug_print_r('args', $args);
    // "verb" has been checked before, no further check is needed
    if (isset($checkList['required'])) {
        for ($i = 0; $i < count($checkList["required"]); $i++) {
            debug_message("Checking: par{$i}: " . $checkList['required'][$i] . " in ");
            debug_var_dump("isset(\$args[\$checkList['required'][\$i]])", isset($args[$checkList['required'][$i]]));
            // echo "key exists". array_key_exists($checkList["required"][$i],$args)."\n";
            if (isset($args[$checkList['required'][$i]]) == false) {
                // echo "caught\n";
                $errors[] = oai_error('missingArgument', $checkList["required"][$i]);
            } else {
                // if metadataPrefix is set, it is in required section
                if (isset($args['metadataPrefix'])) {
                    $metadataPrefix = $args['metadataPrefix'];
                    // Check if the format is supported, it has enough infor (an array), last if a handle has been defined.
                    if (!array_key_exists($metadataPrefix, $METADATAFORMATS) || !(is_array($METADATAFORMATS[$metadataPrefix]) || !isset($METADATAFORMATS[$metadataPrefix]['myhandler']))) {
                        $errors[] = oai_error('cannotDisseminateFormat', 'metadataPrefix', $metadataPrefix);
                    }
                }
                unset($args[$checkList["required"][$i]]);
            }
        }
    }
    debug_message('Before return');
    debug_print_r('errors', $errors);
    if (!empty($errors)) {
        return;
    }
    // check to see if there is unwanted
    foreach ($args as $key => $val) {
        debug_message("checkArgs: {$key}");
        if (!in_array($key, $checkList["ops"])) {
            debug_message("Wrong\n" . print_r($checkList['ops'], true));
            $errors[] = oai_error('badArgument', $key, $val);
        }
        switch ($key) {
            case 'from':
            case 'until':
                if (!checkDateFormat($val)) {
                    $errors[] = oai_error('badGranularity', $key, $val);
                }
                break;
            case 'resumptionToken':
                // only check for expairation
                if ((int) $val + TOKEN_VALID < time()) {
                    $errors[] = oai_error('badResumptionToken');
                }
                break;
        }
    }
}
示例#29
0
					$error_msg .= "Error retreiving invoice!\n";
					debug_message($invoice->getLastError());
				}
				
				if($invoice->sendEmail('InvoiceEmail') === FALSE){
					$error_msg .= "Error sending invoice notification!\n";
					debug_message($invoice->getLastError());
				}
			}
			if(empty($error_msg)){
				goBack();
			}
		}
	}else{
		$error_msg .= "Error adding Payment!\n";
		debug_message($payment->getLastError());
	}
}

?>
<? require('header.php'); ?>
<div class="tableContainer">
<a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" /><?php 
echo $title;
?>
</a><div>
<FORM ACTION="<?php 
echo $_SERVER['PHP_SELF'];
?>
" METHOD="POST" NAME="chk">
<input type="hidden" name="invoice_id" value="<?php 
示例#30
0
<?php

date_default_timezone_set('America/New_York');
require_once 'config/init.php';
require_once 'classes/class_logger.php';
require_once 'config/obdb.php';
require_once 'classes/class_prod_listing.php';
require_once 'classes/class_campaign.php';
require_once 'classes/class_mappings.php';
// Begin script
debug_message('Script begin.');
/**
 *	Save the Agent information
 */
$ra = @$_SERVER['REMOTE_ADDR'];
$hua = @$_SERVER['HTTP_USER_AGENT'];
$ob_log->write("Remote IP: {$ra}");
$ob_log->write("Remote User Agents: {$hua}");
$ob_log->write("");
/***

Availble variables
	$ob_listing
	$ob_campaign
*/
// Get all appointments whose status is complete
// To do - This should go in the Appointment class
$map = new Mapping();
//my_print($map->get_all_keys('map_table_names'));
// ------------------------------ Start Project of the month ------------------------------ //
##$listings = $ob_listing::get_data('l_main', 'specialListingSection', 'projectOfMonth');