本文整理汇总了PHP中getDateValue函数的典型用法代码示例。如果您正苦于以下问题:PHP getDateValue函数的具体用法?PHP getDateValue怎么用?PHP getDateValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getDateValue函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: edit
/**
* Show and process edit milestone form
*
* @access public
* @param void
* @return null
*/
function edit()
{
if (logged_user()->isGuest()) {
flash_error(lang('no access permissions'));
ajx_current("empty");
return;
}
$this->setTemplate('add_milestone');
if (array_var($_REQUEST, "template_milestone")) {
$milestone = TemplateMilestones::findById(get_id());
$this->setTemplate(get_template_path('add_template_milestone', 'template_milestone'));
if (!$milestone instanceof TemplateMilestone) {
flash_error(lang('milestone dnx'));
ajx_current("empty");
return;
}
// if
} else {
$milestone = ProjectMilestones::findById(get_id());
if (!$milestone instanceof ProjectMilestone) {
flash_error(lang('milestone dnx'));
ajx_current("empty");
return;
}
// if
}
if (!$milestone->canEdit(logged_user())) {
flash_error(lang('no access permissions'));
ajx_current("empty");
return;
}
$milestone_data = array_var($_POST, 'milestone');
if (!is_array($milestone_data)) {
// set layout for modal form
if (array_var($_REQUEST, 'modal')) {
$this->setLayout("json");
tpl_assign('modal', true);
}
$milestone_data = array('name' => $milestone->getObjectName(), 'due_date' => $milestone->getDueDate(), 'description' => $milestone->getDescription(), 'is_urgent' => $milestone->getIsUrgent());
// array
}
// if
tpl_assign('milestone_data', $milestone_data);
tpl_assign('milestone', $milestone);
if (is_array(array_var($_POST, 'milestone'))) {
if (array_var($milestone_data, 'due_date_value') != '') {
$milestone_data['due_date'] = getDateValue(array_var($milestone_data, 'due_date_value'));
} else {
$now = DateTimeValueLib::now();
$milestone_data['due_date'] = DateTimeValueLib::make(0, 0, 0, $now->getMonth(), $now->getDay(), $now->getYear());
}
$milestone->setFromAttributes($milestone_data);
$urgent = array_var($milestone_data, 'is_urgent');
$milestone->setIsUrgent($urgent);
try {
$member_ids = json_decode(array_var($_POST, 'members'));
DB::beginWork();
$milestone->save();
$object_controller = new ObjectController();
$object_controller->add_to_members($milestone, $member_ids);
$object_controller->add_subscribers($milestone);
$object_controller->link_to_new_object($milestone);
$object_controller->add_custom_properties($milestone);
$object_controller->add_reminders($milestone);
DB::commit();
ApplicationLogs::createLog($milestone, ApplicationLogs::ACTION_EDIT);
//Send Template milestone to view
if ($milestone instanceof TemplateMilestone) {
$object = array("action" => "edit", "object_id" => $milestone->getObjectId(), "type" => $milestone->getObjectTypeName(), "id" => $milestone->getId(), "name" => $milestone->getObjectName(), "ico" => "ico-milestone", "manager" => get_class($milestone->manager()));
evt_add("template object added", array('object' => $object));
}
$is_template = $milestone instanceof TemplateMilestone;
if (array_var($_REQUEST, 'modal')) {
ajx_current("empty");
$this->setLayout("json");
$this->setTemplate(get_template_path("empty"));
// reload milestone info because plugins may have updated some task info (for example: name prefix)
if ($is_template) {
$milestone = TemplateMilestones::findById($milestone->getId());
$params = array('msg' => lang('success edit milestone', $milestone->getObjectName()), 'milestone' => $milestone->getArrayInfo(), 'reload' => array_var($_REQUEST, 'reload'));
if ($milestone instanceof TemplateMilestone) {
$params = $object;
}
print_modal_json_response($params, true, array_var($_REQUEST, 'use_ajx'));
} else {
$milestone = ProjectMilestones::findById($milestone->getId());
flash_success(lang('success edit milestone', $milestone->getObjectName()));
evt_add("reload current panel");
}
} else {
if ($milestone instanceof TemplateMilestone) {
flash_success(lang('success edit template', $milestone->getObjectName()));
} else {
//.........这里部分代码省略.........
开发者ID:abhinay100,项目名称:feng_app,代码行数:101,代码来源:MilestoneController.class.php
示例2: saveMember
function saveMember($member_data, Member $member, $is_new = true)
{
try {
DB::beginWork();
if (!$is_new) {
$old_parent = $member->getParentMemberId();
}
$member->setFromAttributes($member_data);
/* @var $member Member */
$object_type = ObjectTypes::findById($member->getObjectTypeId());
if (!$object_type instanceof ObjectType) {
throw new Exception(lang("you must select a valid object type"));
}
if ($member->getParentMemberId() == 0) {
$dot = DimensionObjectTypes::findById(array('dimension_id' => $member->getDimensionId(), 'object_type_id' => $member->getObjectTypeId()));
if (!$dot->getIsRoot()) {
throw new Exception(lang("member cannot be root", lang($object_type->getName())));
}
$member->setDepth(1);
} else {
$allowedParents = $this->getAssignableParents($member->getDimensionId(), $member->getObjectTypeId());
if (!$is_new) {
$childrenIds = $member->getAllChildrenIds(true);
}
$hasValidParent = false;
if ($member->getId() == $member->getParentMemberId() || !$is_new && in_array($member->getParentMemberId(), $childrenIds)) {
throw new Exception(lang("invalid parent member"));
}
foreach ($allowedParents as $parent) {
if ($parent['id'] == $member->getParentMemberId()) {
$hasValidParent = true;
break;
}
}
if (!$hasValidParent) {
throw new Exception(lang("invalid parent member"));
}
$parent = Members::findById($member->getParentMemberId());
if ($parent instanceof Member) {
$member->setDepth($parent->getDepth() + 1);
} else {
$member->setDepth(1);
}
}
if ($object_type->getType() == 'dimension_object') {
$handler_class = $object_type->getHandlerClass();
if ($is_new || $member->getObjectId() == 0) {
eval('$dimension_object = ' . $handler_class . '::instance()->newDimensionObject();');
} else {
$dimension_object = Objects::findObject($member->getObjectId());
}
if ($dimension_object) {
$dimension_object->modifyMemberValidations($member);
$dimension_obj_data = array_var($_POST, 'dim_obj');
if (!array_var($dimension_obj_data, 'name')) {
$dimension_obj_data['name'] = $member->getName();
}
eval('$fields = ' . $handler_class . '::getPublicColumns();');
foreach ($fields as $field) {
if (array_var($field, 'type') == DATA_TYPE_DATETIME) {
$dimension_obj_data[$field['col']] = getDateValue($dimension_obj_data[$field['col']]);
}
}
$member->save();
$dimension_object->setFromAttributes($dimension_obj_data, $member);
$dimension_object->save();
$member->setObjectId($dimension_object->getId());
$member->save();
Hook::fire("after_add_dimension_object_member", $member, $null);
}
} else {
$member->save();
}
// Other dimensions member restrictions
$restricted_members = array_var($_POST, 'restricted_members');
if (is_array($restricted_members)) {
MemberRestrictions::clearRestrictions($member->getId());
foreach ($restricted_members as $dim_id => $dim_members) {
foreach ($dim_members as $mem_id => $member_restrictions) {
$restricted = isset($member_restrictions['restricted']);
if ($restricted) {
$order_num = array_var($member_restrictions, 'order_num', 0);
$member_restriction = new MemberRestriction();
$member_restriction->setMemberId($member->getId());
$member_restriction->setRestrictedMemberId($mem_id);
$member_restriction->setOrder($order_num);
$member_restriction->save();
}
}
}
}
// Save member property members (also check for required associations)
if (array_var($_POST, 'save_properties')) {
$required_association_ids = DimensionMemberAssociations::getRequiredAssociatations($member->getDimensionId(), $member->getObjectTypeId(), true);
$missing_req_association_ids = array_fill_keys($required_association_ids, true);
// if keeps record change is_active, if not delete record
$old_properties = MemberPropertyMembers::getAssociatedPropertiesForMember($member->getId());
foreach ($old_properties as $property) {
$association = DimensionMemberAssociations::findById($property->getAssociationId());
if (!$association->getKeepsRecord()) {
//.........这里部分代码省略.........
开发者ID:rorteg,项目名称:fengoffice,代码行数:101,代码来源:MemberController.class.php
示例3: getDateValue
$i = 1;
$td_class = "table_row";
?>
<tr>
<td width="4%" class="<?php
echo $td_class;
?>
"><?php
echo $i;
?>
)</td>
<td width="19%" class="<?php
echo $td_class;
?>
"><?php
echo getDateValue($rsInvoice->invoice_date);
?>
</td>
<td width="32%" class="<?php
echo $td_class;
?>
"><?php
echo $nameplan;
?>
</td>
<td width="15%" class="<?php
echo $td_class;
?>
_end">N$ <?php
echo number_format($pp, 2);
?>
开发者ID:beyondkeysystem,项目名称:testone,代码行数:31,代码来源:invoice_details.php
示例4: sprintf
$msg .= "\n\t\t\t<table width='95%' cellpadding='6' cellspacing='0' class='table_black_border'>\n\t\t\t <tr>\n\t\t\t\t<td class='table_head'>Invoice ID </td>\n\t\t\t\t<td class='table_head'>Invoice Date</td>\n\t\t\t\t<td class='table_head'>";
if ($rsInvoice->invoice_type == 1) {
$msg .= "Plan Name";
} else {
if ($rsInvoice->invoice_type == 2) {
$msg .= "Shortlisted Jobseeker";
}
}
$msg .= "</td>\n\t\t\t\t<td width='16%' class='table_head' ";
if ($rsInvoice->invoice_type == 1) {
$msg .= "style='display:none;'";
}
$msg .= ">Rate Per Position</td>\n\t\t\t\t<td class='table_head'>Amount</td>\n\t\t\t\t\n\t\t\t </tr> ";
$i = 1;
$td_class = 'table_row';
$msg .= "\n\t\t\t <tr>\n\t\t\t\t<td width='11%' class=" . $td_class . ">" . sprintf('%05d', $rsInvoice->invoice_id) . "</td>\n\t\t\t\t<td width='11%' class=" . $td_class . ">" . getDateValue($rsInvoice->invoice_date) . "</td>\n\t\t\t\t<td width='21%' class=" . $td_class . ">";
if ($rsInvoice->invoice_type == 1) {
$msg .= $rsInvoice->plan_name;
} else {
if ($rsInvoice->invoice_type == 2) {
$msg .= $rsInvoice->shortlisted_jobseekers;
}
}
$msg .= " </td>\n\t\t\t\t\n\t\t\t\t<td class='" . $td_class . "' ";
if ($rsInvoice->invoice_type == 1) {
$msg .= "style='display:none;'";
}
$msg .= ">" . $rsInvoice->shortlist_rate_per_position . "</td>\n\t\t\t\t<td width='12%' class='" . $td_class . "'>N\$\n\t\t\t\t\t" . number_format($rsInvoice->rate, 2) . "</td>\n\t\t\t\t\n\t\t\t </tr>\n\t\t\t</table>";
}
$msg .= "</html>";
$msg .= "<br><br>Regards, <br>NamRecruit";
开发者ID:beyondkeysystem,项目名称:testone,代码行数:31,代码来源:approval.php
示例5: total_task_times_vs_estimate_comparison
function total_task_times_vs_estimate_comparison($report_data = null, $task = null)
{
$this->setTemplate('report_wrapper');
if (!$report_data) {
$report_data = array_var($_POST, 'report');
}
$workspace = Projects::findById(array_var($report_data, 'project_id'));
if ($workspace instanceof Project) {
if (array_var($report_data, 'include_subworkspaces')) {
$workspacesCSV = $workspace->getAllSubWorkspacesQuery(false);
} else {
$workspacesCSV = $workspace->getId();
}
} else {
$workspacesCSV = null;
}
$start = getDateValue(array_var($report_data, 'start_value'));
$end = getDateValue(array_var($report_data, 'end_value'));
$st = $start->beginningOfDay();
$et = $end->endOfDay();
$st = new DateTimeValue($st->getTimestamp() - logged_user()->getTimezone() * 3600);
$et = new DateTimeValue($et->getTimestamp() - logged_user()->getTimezone() * 3600);
$timeslots = Timeslots::getTimeslotsByUserWorkspacesAndDate($st, $et, 'ProjectTasks', null, $workspacesCSV, array_var($report_data, 'task_id', 0));
tpl_assign('timeslots', $timeslots);
tpl_assign('workspace', $workspace);
tpl_assign('start_time', $st);
tpl_assign('end_time', $et);
tpl_assign('user', $user);
tpl_assign('post', $report_data);
tpl_assign('template_name', 'total_task_times');
tpl_assign('title', lang('task time report'));
}
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:32,代码来源:ReportingController.class.php
示例6: getDateValue
<tr align="left">
<td width="13%" class="<?php
echo $td_class;
?>
"><a href="#" onClick="chequeDetails(<?php
echo $rsPaid->pay_id;
?>
);" class="blue_title_small" title="Click to view cheque details."><?php
echo $rsPaid->cheque_number;
?>
</a></td>
<td width="13%" class="<?php
echo $td_class;
?>
"><?php
echo getDateValue($rsPaid->pay_date);
?>
</td>
<td width="14%" class="<?php
echo $td_class;
?>
"><?php
echo sprintf("%05d", $rsPaid->pay_id);
?>
</td>
<td width="12%" class="<?php
echo $td_class;
?>
"><a href="#" onClick="viewDetails('invoice_details.php?invoice_id=<?php
echo $rsPaid->invoice_id;
?>
开发者ID:beyondkeysystem,项目名称:testone,代码行数:31,代码来源:cheque_paid.php
示例7: getDateValue
</tr>
</table>
<?php
} else {
if ($cntPlan > 0) {
?>
<table width="100%" cellpadding="3" cellspacing="0">
<tr>
<td width="16"> </td>
<td width="754">
<br>
The previous plan of this recruiter was <span class="subhead_gray_small"><u><?php
echo $plan_name;
?>
</u></span> and expiry date of this plan was <span class="subhead_gray_small"><u><?php
echo getDateValue($expire_date);
?>
</u></span>. <br>
<br>
</td>
</tr>
</table>
<?php
} else {
if ($cntPlan == 0) {
?>
<table width="100%" cellpadding="3" cellspacing="0">
<tr>
<td width="16"> </td>
<td width="754">
<br>
开发者ID:beyondkeysystem,项目名称:testone,代码行数:31,代码来源:change_plan.php
示例8: edit_timeslot
function edit_timeslot()
{
ajx_current("empty");
$timeslot_data = array_var($_POST, 'timeslot');
$timeslot = Timeslots::findById(array_var($timeslot_data, 'id', 0));
if (!$timeslot instanceof Timeslot) {
flash_error(lang('timeslot dnx'));
return;
}
//context permissions or members
$member_ids = json_decode(array_var($_POST, 'members', array()));
// clean member_ids
$tmp_mids = array();
foreach ($member_ids as $mid) {
if (!is_null($mid) && trim($mid) != "") {
$tmp_mids[] = $mid;
}
}
$member_ids = $tmp_mids;
if (empty($member_ids)) {
if (!can_add(logged_user(), active_context(), Timeslots::instance()->getObjectTypeId())) {
flash_error(lang('no access permissions'));
ajx_current("empty");
return;
}
} else {
if (count($member_ids) > 0) {
$enteredMembers = Members::findAll(array('conditions' => 'id IN (' . implode(",", $member_ids) . ')'));
} else {
$enteredMembers = array();
}
if (!can_add(logged_user(), $enteredMembers, Timeslots::instance()->getObjectTypeId())) {
flash_error(lang('no access permissions'));
ajx_current("empty");
return;
}
}
try {
$hoursToAdd = array_var($timeslot_data, 'hours', 0);
$minutes = array_var($timeslot_data, 'minutes', 0);
if (strpos($hoursToAdd, ',') && !strpos($hoursToAdd, '.')) {
$hoursToAdd = str_replace(',', '.', $hoursToAdd);
}
if (strpos($hoursToAdd, ':') && !strpos($hoursToAdd, '.')) {
$pos = strpos($hoursToAdd, ':') + 1;
$len = strlen($hoursToAdd) - $pos;
$minutesToAdd = substr($hoursToAdd, $pos, $len);
if (!strlen($minutesToAdd) <= 2 || !strlen($minutesToAdd) > 0) {
$minutesToAdd = substr($minutesToAdd, 0, 2);
}
$mins = $minutesToAdd / 60;
$hours = substr($hoursToAdd, 0, $pos - 1);
$hoursToAdd = $hours + $mins;
}
if ($minutes) {
$min = str_replace('.', '', $minutes / 6);
$hoursToAdd = $hoursToAdd + ("0." . $min);
}
if ($hoursToAdd <= 0) {
flash_error(lang('time has to be greater than 0'));
return;
}
$startTime = getDateValue(array_var($timeslot_data, 'date'));
$startTime = $startTime->add('h', 8 - logged_user()->getTimezone());
$endTime = getDateValue(array_var($timeslot_data, 'date'));
$endTime = $endTime->add('h', 8 - logged_user()->getTimezone() + $hoursToAdd);
$timeslot_data['start_time'] = $startTime;
$timeslot_data['end_time'] = $endTime;
$timeslot_data['name'] = $timeslot_data['description'];
//Only admins can change timeslot user
if (!array_var($timeslot_data, 'contact_id') && !logged_user()->isAdministrator()) {
$timeslot_data['contact_id'] = $timeslot->getContactId();
}
$timeslot->setFromAttributes($timeslot_data);
$user = Contacts::findById($timeslot_data['contact_id']);
$billing_category_id = $user->getDefaultBillingId();
$bc = BillingCategories::findById($billing_category_id);
if ($bc instanceof BillingCategory) {
$timeslot->setBillingId($billing_category_id);
$hourly_billing = $bc->getDefaultValue();
$timeslot->setHourlyBilling($hourly_billing);
$timeslot->setFixedBilling($hourly_billing * $hoursToAdd);
$timeslot->setIsFixedBilling(false);
}
DB::beginWork();
$timeslot->save();
$member_ids = json_decode(array_var($_POST, 'members', ''));
$object_controller = new ObjectController();
$object_controller->add_to_members($timeslot, $member_ids);
DB::commit();
ApplicationLogs::createLog($timeslot, ApplicationLogs::ACTION_EDIT);
ajx_extra_data(array("timeslot" => $timeslot->getArrayInfo()));
} catch (Exception $e) {
DB::rollback();
flash_error($e->getMessage());
}
// try
}
开发者ID:abhinay100,项目名称:feng_app,代码行数:98,代码来源:TimeController.class.php
示例9: getDateValue
$i = 1;
$td_class = "table_row";
?>
<tr>
<td width="4%" class="<?php
echo $td_class;
?>
"><?php
echo $i;
?>
)</td>
<td width="16%" align="left" class="<?php
echo $td_class;
?>
"><?php
echo getDateValue($rsPay->cheque_date);
?>
</td>
<td width="15%" align="left" class="<?php
echo $td_class;
?>
"><?php
echo $rsPay->ref;
?>
</td>
<td width="21%" align="left" class="<?php
echo $td_class;
?>
"><?php
echo $rsPay->bank;
?>
开发者ID:beyondkeysystem,项目名称:testone,代码行数:31,代码来源:cheque_detail.php
示例10: save_object
private function save_object($request) {
$response = false;
if (!empty($request ['args'])) {
$service = $request ['srv'];
switch ($service) {
case "task" :
if ($request ['args'] ['id']) {
$object = ProjectTasks::instance()->findByid($request ['args'] ['id']);
} else {
$object = new ProjectTask ();
}
if ($object instanceof ProjectTask) {
if (!empty($request ['args'] ['title'])) {
$object->setObjectName($request ['args'] ['title']);
}
if (!empty($request ['args'] ['description'])) {
$object->setText($request ['args'] ['description']);
}
if (!empty($request ['args'] ['due_date'])) {
$object->setDueDate(getDateValue($request ['args'] ['due_date']));
}
if (!empty($request ['args'] ['completed'])) {
$object->setPercentCompleted($request ['args'] ['completed']);
}
if (!empty($request ['args'] ['assign_to'])) {
$object->setAssignedToContactId($request ['args'] ['assign_to']);
}
if (!empty($request ['args'] ['priority'])) {
$object->setPriority($request ['args'] ['priority']);
}
}
break;
case 'note' :
if ($request ['args'] ['id']) {
$object = ProjectMessages::instance()->findByid($request ['args'] ['id']);
} else {
$object = new ProjectMessage();
}
if ($object instanceof ProjectMessage) {
if (!empty($request ['args'] ['title'])) {
$object->setObjectName($request ['args'] ['title']);
}
if (!empty($request ['args'] ['title'])) {
$object->setText($request ['args'] ['text']);
}
}
break;
}// END SWITCH
if ($object) {
try {
$context = array();
$members = array();
if (!empty($request['args']['members'])) {
$members = $request['args']['members'];
$context = get_context_from_array($members);
}
//Check permissions:
if ($request['args']['id'] && $object->canEdit(logged_user()) ||
!$request['args']['id'] && $object->canAdd(logged_user(), $context)) {
DB::beginWork();
$object->save();
$object_controller = new ObjectController ();
if (!$request['args']['id']) {
$object_controller->add_to_members($object, $members);
}
DB::commit();
$response = true;
}
} catch (Exception $e) {
DB::rollback();
return false;
}
}
}
return $this->response('json', $response);
}
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:80,代码来源:ApiController.class.php
示例11: getDateValue
"><?php
echo $rsComp->comp_name;
?>
</td>
<td width="16%" class="<?php
echo $td_class;
?>
"><?php
echo $rsSeeker->town;
?>
</td>
<td width="16%" class="<?php
echo $td_class;
?>
_end"><?php
echo getDateValue($rsSeeker->ad_date, 3);
?>
</td>
</tr>
<?php
$i++;
}
?>
</table>
<?php
}
?>
</td>
</tr>
<tr align="center">
<td valign="middle" height="10"></td>
开发者ID:beyondkeysystem,项目名称:testone,代码行数:31,代码来源:bookmark_jobs1.php
示例12: getDateValue
" ><?php
echo $period;
?>
</td>
<td width="16%" class="<?php
echo $td_class;
?>
" ><?php
echo getDateValue($rstemp->{$seeker_period_from});
?>
</td>
<td width="18%" class="<?php
echo $td_class;
?>
" ><?php
echo getDateValue($rstemp->{$seeker_period_to});
?>
</td>
<td class="<?php
echo $td_class;
?>
_end" ><?php
echo $rstemp->{$seeker_period_reason};
?>
</td>
</tr>
<?php
$j++;
}
?>
</table></td>
开发者ID:beyondkeysystem,项目名称:testone,代码行数:31,代码来源:view_profile_old.php
示例13: getDateValue
"><input type="checkbox" name="chk[]" id= "chk" value="<?php
echo $rsRec->rec_id;
?>
"></td>
<td class="<?php
echo $td_class;
?>
"><?php
echo $rsRec->rec_uid;
?>
</td>
<td width="8%" class="<?php
echo $td_class;
?>
"><?php
echo getDateValue($rsRec->rec_reg_date);
?>
</td>
<td width="11%" class="<?php
echo $td_class;
?>
"><?php
echo $rsRec->comp_name;
?>
</td>
<td width="10%" class="<?php
echo $td_class;
?>
"><?php
echo $rsRec->rec_name;
?>
开发者ID:beyondkeysystem,项目名称:testone,代码行数:31,代码来源:employers_list.php
示例14: mysql_query
$subject = "Login information of namrecruit.com";
$msg = "Dear " . $rsRec->rec_name . ",<br><br>";
$msg .= "Thank you for registering with NamRecruit. <br><br>";
$msg .= "Use following information to login namrecruit.com.<br>";
$msg .= "Username : " . $rsRec->rec_email;
$msg .= "<br>Password : " . $rsRec->rec_password;
$msg .= "<br><br>Regards, <br>NamRecruit.";
$from = "NamRecruit <[email protected]>";
$headers = "From: {$from}\nContent-Type: text/html; charset=iso-8859-1";
@mail($emailto, $subject, $msg, $headers);
}
$sqlPay = "select * from job_rec_payments where pay_id=" . $_GET["pid"];
$resultPay = mysql_query($sqlPay);
$rsPay = mysql_fetch_object($resultPay);
$invoice_no = sprintf("%05d", $_GET["Iid"]);
$pay_date = getDateValue($rsPay->pay_date);
$msg = "";
$emailto = $rsRec->rec_email;
$subject = "Payment Recieved (Invoice No. " . $invoice_no . ")";
$msg = "Dear " . $rsRec->rec_name . ",<br><br>";
$msg .= "Your payment to namrecruit.com for invoice no <u>" . $invoice_no . "</u> was successful. Your account has been updated.<br><br><b>Payment Details : </b><br>";
$msg .= "Payment Date : " . $pay_date . "<br>";
$msg .= "Paid Amount : N\$ " . number_format($rsPay->pay_amount, 2);
$msg .= "<br><br>To view/print your invoice details, <a href='http://www.namrecruit.com/recruiter/view_invoice.php?paid_by=" . $rsPay->paid_by . "&vi=" . base64_encode($invoice_no) . "'>click here</a>.";
$msg .= "<br><br>Regards, <br>NamRecruit.";
$from = "NamRecruit <[email protected]>";
$headers = "From: {$from}\nContent-Type: text/html; charset=iso-8859-1";
@mail($emailto, $subject, $msg, $headers);
if ($rsComp->type == "rec") {
$array_comp["comp_type"] = "2";
} else {
开发者ID:beyondkeysystem,项目名称:testone,代码行数:31,代码来源:payment_status.php
示例15: icalendar_export
function icalendar_export() {
$this->setTemplate('cal_export');
$calendar_name = array_var($_POST, 'calendar_name');
if ($calendar_name != '') {
$from = getDateValue(array_var($_POST, 'from_date'));
$to = getDateValue(array_var($_POST, 'to_date'));
$events = ProjectEvents::getRangeProjectEvents($from, $to);
$buffer = CalFormatUtilities::generateICalInfo($events, $calendar_name);
$filename = rand().'.tmp';
$handle = fopen(ROOT.'/tmp/'.$filename, 'wb');
fwrite($handle, $buffer);
fclose($handle);
$_SESSION['calendar_export_filename'] = $filename;
$_SESSION['calendar_name'] = $calendar_name;
flash_success(lang('success export calendar', count($events)));
ajx_current("empty");
} else {
unset($_SESSION['calendar_export_filename']);
unset($_SESSION['calendar_name']);
return;
}
}
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:26,代码来源:EventController.class.php
示例16: getDateValue
"></td>
<td width="12%" align="left" class="<?php
echo $td_class;
?>
"><a href="#" onClick="chequeDetails(<?php
echo $rsPaid->pay_id;
?>
);" class="blue_title_small" title="Click to view cheque details."><?php
echo $rsPaid->cheque_number;
?>
</a></td>
<td width="13%" align="left" class="<?php
echo $td_class;
?>
"><?php
echo getDateValue($rsPaid->received_date);
?>
</td>
<td width="14%" align="left" class="<?php
echo $td_class;
?>
"><?php
echo sprintf("%05d", $rsPaid->pay_id);
?>
</td>
<td width="12%" align="left" class="<?php
echo $td_class;
?>
"><a href="#" onClick="viewDetails('invoice_details.php?invoice_id=<?php
echo $rsPaid->invoice_id;
?>
开发者ID:beyondkeysystem,项目名称:testone,代码行数:31,代码来源:cheque_received.php
示例17: edit
/**
* Edit timeslot
*
* @param void
* @return null
*/
function edit()
{
$this->setTemplate('add_timeslot');
$timeslot = Timeslots::findById(get_id());
if (!$timeslot instanceof Timeslot) {
flash_error(lang('timeslot dnx'));
ajx_current("empty");
return;
}
$object = $timeslot->getRelObject();
if (!$object instanceof ContentDataObject) {
flash_error(lang('object dnx'));
ajx_current("empty");
return;
}
if (!$object->canAddTimeslot(logged_user())) {
flash_error(lang('no access permissions'));
ajx_current("empty");
return;
}
if (!$timeslot->canEdit(logged_user())) {
flash_error(lang('no access permissions'));
ajx_current("empty");
return;
}
$timeslot_data = array_var($_POST, 'timeslot');
if (!is_array($timeslot_data)) {
$timeslot_data = array('contact_id' => $timeslot->getContactId(), 'description' => $timeslot->getDescription(), 'start_time' => $timeslot->getStartTime(), 'end_time' => $timeslot->getEndTime(), 'is_fixed_billing' => $timeslot->getIsFixedBilling(), 'hourly_billing' => $timeslot->getHourlyBilling(), 'fixed_billing' => $timeslot->getFixedBilling());
}
tpl_assign('timeslot_form_object', $object);
tpl_assign('timeslot', $timeslot);
tpl_assign('timeslot_data', $timeslot_data);
tpl_assign('show_billing', BillingCategories::count() > 0);
if (is_array(array_var($_POST, 'timeslot'))) {
try {
$this->percent_complete_delete($timeslot);
$timeslot->setContactId(array_var($timeslot_data, 'contact_id', logged_user()->getId()));
$timeslot->setDescription(array_var($timeslot_data, 'description'));
$st = getDateValue(array_var($timeslot_data, 'start_value'), DateTimeValueLib::now());
$st->setHour(array_var($timeslot_data, 'start_hour'));
$st->setMinute(array_var($timeslot_data, 'start_minute'));
$et = getDateValue(array_var($timeslot_data, 'end_value'), DateTimeValueLib::now());
$et->setHour(array_var($timeslot_data, 'end_hour'));
$et->setMinute(array_var($timeslot_data, 'end_minute'));
$st = new DateTimeValue($st->getTimestamp() - logged_user()->getTimezone() * 3600);
$et = new DateTimeValue($et->getTimestamp() - logged_user()->getTimezone() * 3600);
$timeslot->setStartTime($st);
$timeslot->setEndTime($et);
if ($timeslot->getStartTime() > $timeslot->getEndTime()) {
flash_error(lang('error start time after end time'));
ajx_current("empty");
return;
}
$seconds = array_var($timeslot_data, 'subtract_seconds', 0);
$minutes = array_var($timeslot_data, 'subtract_minutes', 0);
$hours = array_var($timeslot_data, 'subtract_hours', 0);
$subtract = $seconds + 60 * $minutes + 3600 * $hours;
if ($subtract < 0) {
flash_error(lang('pause time cannot be negative'));
ajx_current("empty");
return;
}
$testEndTime = new DateTimeValue($timeslot->getEndTime()->getTimestamp());
$testEndTime->add('s', -$subtract);
if ($timeslot->getStartTime() > $testEndTime) {
flash_error(lang('pause time cannot exceed timeslot time'));
ajx_current("empty");
return;
}
$timeslot->setSubtract($subtract);
if ($timeslot->getUser()->getDefaultBillingId()) {
$timeslot->setIsFixedBilling(array_var($timeslot_data, 'is_fixed_billing', false));
$timeslot->setHourlyBilling(array_var($timeslot_data, 'hourly_billing', 0));
if ($timeslot->getIsFixedBilling()) {
$timeslot->setFixedBilling(array_var($timeslot_data, 'fixed_billing', 0));
} else {
$timeslot->setFixedBilling($timeslot->getHourlyBilling() * $timeslot->getMinutes() / 60);
}
if ($timeslot->getBillingId() == 0 && ($timeslot->getHourlyBilling() > 0 || $timeslot->getFixedBilling() > 0)) {
$timeslot->setBillingId($timeslot->getUser()->getDefaultBillingId());
}
}
DB::beginWork();
$timeslot->save();
$timeslot_time = ($timeslot->getEndTime()->getTimestamp() - ($timeslot->getStartTime()->getTimestamp() + $timeslot->getSubtract())) / 3600;
$task = ProjectTasks::findById($timeslot->getRelObjectId());
if ($task->getTimeEstimate() > 0) {
$timeslot_percent = round($timeslot_time * 100 / ($task->getTimeEstimate() / 60));
$total_percentComplete = $timeslot_percent + $task->getPercentCompleted();
if ($total_percentComplete < 0) {
$total_percentComplete = 0;
}
$task->setPercentCompleted($total_percentComplete);
$task->save();
//.........这里部分代码省略.........
开发者ID:rorteg,项目名称:fengoffice,代码行数:101,代码来源:TimeslotController.class.php
-
Shinmera/tooter: A Common Lisp client library for Mastodon instances.
阅读:615|2022-08-17
-
中文大写金额数字前应标明人民币字样,大写金额数字应紧接人民币字样填写,不得留有空
阅读:494|2022-07-30
-
级的笔顺是什么?级的笔顺笔画顺序怎么写?还有级的拼音及意思是什么,好多初学练字者
阅读:736|2022-11-06
-
amezin/vscode-linux-kernel: Visual Studio Code project/compile_commands.json gen
阅读:355|2022-08-15
-
amp;amp;lt;viewclass=amp;quot;containeramp;quot;amp;amp;gt;amp;amp;lt;viewclass=
阅读:692|2022-07-18
-
zlotus/notes-LSJU-machine-learning: 机器学习笔记
阅读:393|2022-08-18
-
havit/Havit.Blazor: Free Bootstrap 5 components for ASP.NET Blazor + optional en
阅读:830|2022-08-16
-
stanhebben/MineTweaker3: Tweak your minecraft experience
阅读:327|2022-08-16
-
与增加几乎陷入停滞的智能手机相比,平板电脑的境遇更加惨淡,2017年第一季度,全球平
阅读:198|2022-11-06
-
bingyue/easy-springmvc-maven: A simple demo about how to use maven combine sprin
阅读:471|2022-08-17
|
请发表评论