function getFriendsOrFollowersArray($count, $domain) { $followers = array(); for ($i = 1; $i <= $count; $i++) { $thisFollower = getIdentifier($domain); // This statement pushes the Follower or Friend // as a name/value pair ("identifier" => "http://twitter.com/account/profile?user_id=76767676767") // onto the $followers stack $followers[] = array("identifier" => $thisFollower); } return $followers; }
function createSchedule(HpsPayPlanService $service, $customerKey, $paymentMethodKey, $amount) { $schedule = new HpsPayPlanSchedule(); $schedule->scheduleIdentifier = getIdentifier('CreditV'); $schedule->customerKey = $customerKey; $schedule->scheduleStatus = HpsPayPlanScheduleStatus::ACTIVE; $schedule->paymentMethodKey = $paymentMethodKey; $schedule->subtotalAmount = new HpsPayPlanAmount($amount); $schedule->startDate = date('m30Y', strtotime(date('Y-m-d', strtotime(date('Y-m-d'))) . '+1 month')); $schedule->processingDateInfo = '31'; $schedule->frequency = HpsPayPlanScheduleFrequency::MONTHLY; $schedule->duration = HpsPayPlanScheduleDuration::ONGOING; $schedule->reprocessingCount = 1; $response = $service->addSchedule($schedule); return $response->scheduleKey; }
$form =& $obj->getForm(); $form->display(); } break; case "delete": $obj =& $handler->get($_REQUEST['id']); if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { if ($handler->delete($obj)) { redirect_header('newsletter.php?op=list', 3, sprintf(_NL_AM_DELETEDSUCCESS, $typetitle)); } else { echo implode('<br />', $obj->getErrors()); } } else { smart_xoops_cp_header(); smart_adminMenu(0); xoops_confirm(array('ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete'), 'newsletter.php', sprintf(_NL_AM_RUSUREDEL, getIdentifier($obj, $handler))); } break; case "details": smart_xoops_cp_header(); smart_adminMenu(0); $newsletter = $handler->get($id); $newsletter_arr = $newsletter->toArray(); $xoopsTpl->assign('newsletter', $newsletter_arr); $rule_handler = xoops_getmodulehandler('rule'); $newsletter_criteria = new Criteria('newsletterid', $id); $criteria = new CriteriaCompo($newsletter_criteria); $rules = $rule_handler->getObjects($newsletter_criteria, true, false); if (count($rules) > 0) { foreach (array_keys($rules) as $i) { if (file_exists(XOOPS_ROOT_PATH . "/language/" . $GLOBALS['xoopsConfig']['language'] . "/calendar.php")) {
<?php /** $Id: unauthorized.php 202 2010-03-10 10:18:34Z stian $ */ defined('KOOWA') or die('Restricted access'); ?> <div class="<?php echo @getIdentifier()->package; ?> "> <?php echo @render(@$msg, @$title, @$module); ?> </div>
} else { $response = deleteApplication($email, $password, $dbName, $appId); } if (isOK($response)) { printResult($response, "DELETING APPLICATION FROM CVS FAILED", " Application {$appId} has been deleted from the database {$dbName}." . PHP_EOL . " ---- DELETING APPLICATION FROM CVS SUCCESSFULLY COMPLETED ----"); } else { echo $response->getMessage(); } break; case "addItem": echo "Adding item..." . PHP_EOL; $email = getEMail(); $password = getPassword(); $dbName = getDbName(); $filePath = getItemPath(); $identifier = getIdentifier(); $metadata = getMetadata(); $msg = validateItemPath($filePath); if (isset($msg)) { echo $msg; break; } $fileName = basename($filePath); $parentFolder = dirname($filePath); $oldFileName = $fileName; $msg = replaceWhitespaces($fileName, $parentFolder); if (isset($msg)) { break; } else { $filePath = substr_replace($filePath, $fileName, strlen($filePath) - strlen($oldFileName)); }