/** * s2Member's PayPal Auto-Return/PDT handler (inner processing routine). * * @package s2Member\PayPal * @since 110720 * * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}. * @return array|bool The original ``$paypal`` array passed in (extracted) from ``$vars``, or false when conditions do NOT apply. */ public static function cp($vars = array()) { extract($vars); foreach (array_keys(get_defined_vars()) as $__v) { $__refs[$__v] =& ${$__v}; } do_action("ws_plugin__s2member_during_paypal_return_before_no_return_data", get_defined_vars()); unset($__refs, $__v); $paypal["s2member_log"][] = "No Return-Data. Customer MUST wait for Email Confirmation."; $paypal["s2member_log"][] = "Note. This can sometimes happen when/if you are offering an Initial/Trial Period. There are times when a Payment Gateway will NOT supply s2Member with any data immediately after checkout. When/if this happens, s2Member must process the transaction via IPN only (i.e. behind-the-scene), and the Customer must wait for Email Confirmation in these cases."; $paypal["s2member_log"][] = var_export($_REQUEST, true); foreach (array_keys(get_defined_vars()) as $__v) { $__refs[$__v] =& ${$__v}; } do_action("ws_plugin__s2member_during_paypal_return_during_no_return_data", get_defined_vars()); unset($__refs, $__v); if ($custom_success_redirection) { $paypal["s2member_log"][] = "Redirecting Customer to a custom URL: " . $custom_success_redirection . "."; wp_redirect($custom_success_redirection); } else { $paypal["s2member_log"][] = "Redirecting Customer to the Home Page (after asking Customer to check their email)."; echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! (you MUST check your email before proceeding).</strong><br /><br />* Note: It can take <em>(up to 15 minutes)</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || c_ws_plugin__s2member_utils_conds::pro_is_installed() && !empty($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]) ? '<br /><br />' . _x('<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''), _x("Back To Home Page", "s2member-front", "s2member"), home_url("/")); } foreach (array_keys(get_defined_vars()) as $__v) { $__refs[$__v] =& ${$__v}; } do_action("ws_plugin__s2member_during_paypal_return_after_no_return_data", get_defined_vars()); unset($__refs, $__v); return apply_filters("c_ws_plugin__s2member_paypal_return_in_no_tx_data", $paypal, get_defined_vars()); }
public function indexAction(Request $request, SessionInterface $session) { if (Util::checkUserIsLoggedIn()) { $clientSettings = $session->get('client/settings'); $session->set('selected_product_id', SystemProduct::SYS_PRODUCT_DOCUMENTADOR); $clientId = $session->get('client/id'); } else { $httpHOST = Util::getHttpHost(); $clientId = $this->getRepository(UbirimiClient::class)->getByBaseURL($httpHOST, 'array', 'id'); $clientSettings = $this->getRepository(UbirimiClient::class)->getById($clientId); $loggedInUserId = null; $settingsDocumentador = $this->getRepository(UbirimiClient::class)->getDocumentadorSettings($clientId); $documentatorUseAnonymous = $settingsDocumentador['anonymous_use_flag']; $documentatorAnonymousViewUserProfiles = $settingsDocumentador['anonymous_view_user_profile_flag']; if (!($documentatorUseAnonymous && $documentatorAnonymousViewUserProfiles)) { Util::signOutAndRedirect(); die; } } $userId = $request->get('id'); $user = $this->getRepository(UbirimiUser::class)->getById($userId); if ($user['client_id'] != $clientId) { return new RedirectResponse('/general-settings/bad-link-access-denied'); } $menuSelectedCategory = 'documentator'; $activities = $this->getRepository(UbirimiUser::class)->getDocumentadorActivityStream($userId); $sectionPageTitle = $session->get('client/settings/title_name') . ' / ' . SystemProduct::SYS_PRODUCT_DOCUMENTADOR_NAME . ' / ' . $user['first_name'] . ' ' . $user['last_name'] . ' / Activity'; return $this->render(__DIR__ . '/../../Resources/views/user/Activity.php', get_defined_vars()); }
/** * @param $id * @param bool $disablePermissionChecking */ public function __construct($id = null, $disablePermissionChecking = false) { parent::__construct(); $this->id = $id; $this->args = get_defined_vars(); $this->disablePermissionChecking = $disablePermissionChecking; }
public function indexAction(Request $request, SessionInterface $session) { Util::checkUserIsLoggedInAndRedirect(); $clientId = $session->get('client/id'); $workflowId = $request->get('id'); $stepIdFrom = $request->get('step_id_from'); $stepIdTo = $request->get('step_id_to'); $projectId = $request->get('project_id'); $issueId = $request->get('issue_id'); $assignableUsers = $this->getRepository(YongoProject::class)->getUsersWithPermission($projectId, Permission::PERM_ASSIGNABLE_USER); $projectData = $this->getRepository(YongoProject::class)->getById($projectId); $issue = $this->getRepository(Issue::class)->getByIdSimple($issueId); $workflowData = $this->getRepository(Workflow::class)->getDataByStepIdFromAndStepIdTo($workflowId, $stepIdFrom, $stepIdTo); $screenId = $workflowData['screen_id']; $allUsers = $this->getRepository(UbirimiUser::class)->getByClientId($session->get('client/id')); $screenData = $this->getRepository(Screen::class)->getDataById($screenId); $screenMetadata = $this->getRepository(Screen::class)->getMetaDataById($screenId); $resolutions = $this->getRepository(IssueSettings::class)->getAllIssueSettings('resolution', $clientId); $projectComponents = $this->getRepository(YongoProject::class)->getComponents($projectId); $projectVersions = $this->getRepository(YongoProject::class)->getVersions($projectId); $htmlOutput = ''; $htmlOutput .= '<table class="modal-table">'; $reporterUsers = $this->getRepository(YongoProject::class)->getUsersWithPermission($projectId, Permission::PERM_CREATE_ISSUE); $fieldCodeNULL = null; $fieldData = $this->getRepository(YongoProject::class)->getFieldInformation($projectData['issue_type_field_configuration_id'], $issue['type_id'], 'array'); return $this->render(__DIR__ . '/../../Resources/views/issue/TransitionDialog.php', get_defined_vars()); }
public function __construct() { echo '<div class="wrap ws-menu-page">' . "\n"; echo '<div class="ws-menu-page-toolbox">' . "\n"; c_ws_plugin__s2member_menu_pages_tb::display(); echo '</div>' . "\n"; echo '<h2>Specs / Info</h2>' . "\n"; echo '<table class="ws-menu-page-table">' . "\n"; echo '<tbody class="ws-menu-page-table-tbody">' . "\n"; echo '<tr class="ws-menu-page-table-tr">' . "\n"; echo '<td class="ws-menu-page-table-l">' . "\n"; echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/brand-icon.png" class="ws-menu-page-brand-icon" alt="." />' . "\n"; echo '<a href="' . esc_attr(add_query_arg("c_check_ver", urlencode(c_ws_plugin__s2member_readmes::parse_readme_value("Version")), c_ws_plugin__s2member_readmes::parse_readme_value("Plugin URI"))) . '" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/brand-updates.png" class="ws-menu-page-brand-updates" alt="." /></a>' . "\n"; do_action("ws_plugin__s2member_during_info_page_before_left_sections", get_defined_vars()); if (apply_filters("ws_plugin__s2member_during_info_page_during_left_sections_display_readme", true, get_defined_vars())) { do_action("ws_plugin__s2member_during_info_page_during_left_sections_before_readme", get_defined_vars()); echo '<div class="ws-menu-page-readme">' . "\n"; do_action("ws_plugin__s2member_during_info_page_during_left_sections_during_readme", get_defined_vars()); echo c_ws_plugin__s2member_readmes::parse_readme() . "\n"; echo '</div>' . "\n"; do_action("ws_plugin__s2member_during_info_page_during_left_sections_after_readme", get_defined_vars()); } do_action("ws_plugin__s2member_during_info_page_after_left_sections", get_defined_vars()); echo '</td>' . "\n"; echo '<td class="ws-menu-page-table-r">' . "\n"; c_ws_plugin__s2member_menu_pages_rs::display(); echo '</td>' . "\n"; echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '</div>' . "\n"; }
/** * s2Member's PayPal® Auto-Return/PDT handler ( inner processing routine ). * * @package s2Member\PayPal * @since 110720 * * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}. * @return array|bool The original ``$paypal`` array passed in ( extracted ) from ``$vars``, or false when conditions do NOT apply. */ public static function cp($vars = array()) { extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */ /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__s2member_during_paypal_return_before_explicit_ty_email", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ $paypal["s2member_log"][] = "Customer must wait for Email Confirmation `proxy_use`: ( `ty-email` )."; /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__s2member_during_paypal_return_during_explicit_ty_email", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ if ($custom_success_redirection) { /* Using a custom success redirection URL? */ $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection . ". However, the Customer MUST wait for Email Confirmation `proxy_use`: ( `ty-email` )."; } else { /* Else we use the default redirection URL for this scenario, which is the Home Page. */ $paypal["s2member_log"][] = "Redirecting Customer to the Home Page. Customer must wait for Email Confirmation `proxy_use`: ( `ty-email` )."; } /**/ echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! ( you MUST check your email before proceeding ).</strong><br /><br />* Note: It can take <em>( up to 15 minutes )</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || c_ws_plugin__s2member_utils_conds::pro_is_installed() && !empty($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]) ? '<br /><br />' . _x('<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''), $custom_success_redirection ? _x("Check Your Email ( Then Click Here )", "s2member-front", "s2member") : esc_html("Back To Home Page", "s2member"), $custom_success_redirection ? $custom_success_redirection : home_url("/")); /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__s2member_during_paypal_return_after_explicit_ty_email", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ return apply_filters("c_ws_plugin__s2member_paypal_return_in_proxy_ty_email", $paypal, get_defined_vars()); }
public function testLocalVar() { $myvar = 'ok'; // define a variable in local scope $v = CX::factory(get_defined_vars())->ns(CX::LOCAL)->getValue('myvar'); $this->assertEquals($v, 'ok'); }
public function indexAction(Request $request, SessionInterface $session) { Util::checkUserIsLoggedInAndRedirect(); $screenId = $request->get('id'); $screenMetadata = $this->getRepository(Screen::class)->getMetaDataById($screenId); if ($screenMetadata['client_id'] != $session->get('client/id')) { return new RedirectResponse('/general-settings/bad-link-access-denied'); } $position = $request->get('position'); $fieldId = $request->get('field_id'); if ($fieldId && $position) { $this->getRepository(Screen::class)->updatePositionForField($screenId, $fieldId, $position); return new RedirectResponse('/yongo/administration/screen/configure/' . $screenId); } $fields = $this->getRepository(Field::class)->getByClient($session->get('client/id')); if ($request->request->has('add_screen_field')) { $fieldId = Util::cleanRegularInputField($request->request->get('field')); if ($fieldId != -1) { $currentDate = Util::getServerCurrentDateTime(); $lastOrder = $this->getRepository(Screen::class)->getLastOrderNumber($screenId); $this->getRepository(Screen::class)->addData($screenId, $fieldId, $lastOrder + 1, $currentDate); $this->getLogger()->addInfo('UPDATE Yongo Screen Data ' . $screenMetadata['name'], $this->getLoggerContext()); return new RedirectResponse('/yongo/administration/screen/configure/' . $screenId); } } $screenData = $this->getRepository(Screen::class)->getDataById($screenId); $menuSelectedCategory = 'issue'; $source = $request->get('source'); $projectId = null; if ($source == 'project_screen' || $source == 'project_field') { $projectId = $request->get('project_id'); } $sectionPageTitle = $session->get('client/settings/title_name') . ' / ' . SystemProduct::SYS_PRODUCT_YONGO_NAME . ' / Update Screen'; return $this->render(__DIR__ . '/../../../Resources/views/administration/screen/Configure.php', get_defined_vars()); }
function getVars($filename) { require $filename; $vars = get_defined_vars(); unset($vars['filename']); return $vars; }
/** * Log in as a user * * ## OPTIONS * [<email>] * : Email address to log in as. * * [--password=<value>] * : Log in non-interactively with this password. Useful for automation. * * [--machine-token=<value>] * : Authenticates using a machine token from your dashboard. Stores the * token for future use. * * [--debug] * : dump call information when logging in. */ public function login($args, $assoc_args) { if (!empty($args)) { $email = array_shift($args); } if (isset($assoc_args['machine-token']) && $assoc_args['machine-token'] !== true) { // Try to log in using a machine token, if provided. $token_data = ['token' => $assoc_args['machine-token']]; $this->auth->logInViaMachineToken($token_data); } elseif (isset($email) && !isset($assoc_args['password']) && $this->auth->tokenExistsForEmail($email)) { // Try to log in using a machine token, if the account email was provided. $this->auth->logInViaMachineToken(compact('email')); } elseif (empty($args) && isset($_SERVER['TERMINUS_MACHINE_TOKEN'])) { // Try to log in using a machine token, if it's in the $_SERVER. $token_data = ['token' => $_SERVER['TERMINUS_MACHINE_TOKEN']]; $this->auth->logInViaMachineToken($token_data); } elseif (isset($_SERVER['TERMINUS_USER']) && !isset($assoc_args['password']) && $this->auth->tokenExistsForEmail($_SERVER['TERMINUS_USER'])) { // Try to log in using a machine token, if $_SERVER provides account email. $this->auth->logInViaMachineToken(['email' => $_SERVER['TERMINUS_USER']]); } elseif (!isset($email) && ($only_token = $this->auth->getOnlySavedToken())) { // Try to log in using a machine token, if there is only one saved token. $this->auth->logInViaMachineToken(['email' => $only_token['email']]); } else { if (isset($email) && isset($assoc_args['password'])) { $password = $assoc_args['password']; $this->auth->logInViaUsernameAndPassword($email, $assoc_args['password']); } else { $this->log()->info("Please visit the Dashboard to generate a machine token:\n{url}", ['url' => $this->auth->getMachineTokenCreationUrl()]); exit(1); } } $this->log()->debug(get_defined_vars()); $this->helpers->launch->launchSelf(['command' => 'art', 'args' => ['fist']]); }
public function indexAction(Request $request, SessionInterface $session) { $entityId = $request->get('id'); if (Util::checkUserIsLoggedIn()) { $session->set('selected_product_id', SystemProduct::SYS_PRODUCT_DOCUMENTADOR); $loggedInUserId = $session->get('user/id'); $page = $this->getRepository(Entity::class)->getById($entityId, $loggedInUserId); if ($page) { $spaceId = $page['space_id']; } $sectionPageTitle = $session->get('client/settings/title_name') . ' / ' . SystemProduct::SYS_PRODUCT_DOCUMENTADOR_NAME . ' / ' . $page['name'] . ' / Attachments'; } else { $httpHOST = Util::getHttpHost(); $clientId = $this->getRepository(UbirimiClient::class)->getByBaseURL($httpHOST, 'array', 'id'); $loggedInUserId = null; $settingsDocumentador = $this->getRepository(UbirimiClient::class)->getDocumentadorSettings($clientId); $documentatorUseAnonymous = $settingsDocumentador['anonymous_use_flag']; $page = $this->getRepository(Entity::class)->getById($entityId, $loggedInUserId); if ($page) { $spaceId = $page['space_id']; $spaceHasAnonymousAccess = $this->getRepository(Space::class)->hasAnonymousAccess($spaceId); if (!($documentatorUseAnonymous && $spaceHasAnonymousAccess)) { Util::signOutAndRedirect(); die; } } $sectionPageTitle = SystemProduct::SYS_PRODUCT_DOCUMENTADOR_NAME . ' / ' . $page['name'] . ' / Attachments'; } $menuSelectedCategory = 'documentator'; if ($page) { $attachments = $this->getRepository(EntityAttachment::class)->getByEntityId($entityId); } return $this->render(__DIR__ . '/../../../Resources/views/page/attachment/View.php', get_defined_vars()); }
/** * Log in as a user * * ## OPTIONS * [<email>] * : Email address to log in as. * * [--password=<value>] * : Log in non-interactively with this password. Useful for automation. * * [--machine-token=<value>] * : Authenticate using an Auth0 token * * [--debug] * : dump call information when logging in. */ public function login($args, $assoc_args) { // Try to login using a machine token, if provided. if (isset($assoc_args['machine-token']) || empty($args) && isset($_SERVER['TERMINUS_MACHINE_TOKEN'])) { $token = $_SERVER['TERMINUS_MACHINE_TOKEN']; if (isset($assoc_args['machine-token'])) { $token = $assoc_args['machine-token']; } $this->auth->logInViaMachineToken($token); } else { // Otherwise, do a normal email/password-based login. if (empty($args)) { if (isset($_SERVER['TERMINUS_USER'])) { $email = $_SERVER['TERMINUS_USER']; } else { $email = Terminus::prompt('Your email address?', null); } } else { $email = $args[0]; } if (isset($assoc_args['password'])) { $password = $assoc_args['password']; } else { $password = Terminus::promptSecret('Your dashboard password (input will not be shown)'); } $this->auth->logInViaUsernameAndPassword($email, $password); } $this->log()->debug(get_defined_vars()); Terminus::launchSelf('art', array('fist')); }
public function __construct() { require '/etc/lxc-containervars.php'; foreach (get_defined_vars() as $var => $value) { $this->data[str_replace('lxc_', '', $var)] = $value; } }
public function indexAction(Request $request, SessionInterface $session) { Util::checkUserIsLoggedInAndRedirect(); $emptyPriorityName = false; $priorityExists = false; if ($request->request->has('new_priority')) { $name = Util::cleanRegularInputField($request->request->get('name')); $description = Util::cleanRegularInputField($request->request->get('description')); $color = Util::cleanRegularInputField($request->request->get('color')); if (empty($name)) { $emptyPriorityName = true; } // check for duplication $priority = $this->getRepository(IssueSettings::class)->getByName($session->get('client/id'), 'priority', mb_strtolower($name)); if ($priority) { $priorityExists = true; } if (!$priorityExists && !$emptyPriorityName) { $iconName = 'generic.png'; $currentDate = Util::getServerCurrentDateTime(); $this->getRepository(IssueSettings::class)->create('issue_priority', $session->get('client/id'), $name, $description, $iconName, $color, $currentDate); $this->getLogger()->addInfo('ADD Yongo Issue Priority ' . $name, $this->getLoggerContext()); return new RedirectResponse('/yongo/administration/issue/priorities'); } } $menuSelectedCategory = 'issue'; $sectionPageTitle = $session->get('client/settings/title_name') . ' / ' . SystemProduct::SYS_PRODUCT_YONGO_NAME . ' / Create Issue Priority'; return $this->render(__DIR__ . '/../../../../Resources/views/administration/issue/priority/Add.php', get_defined_vars()); }
public function indexAction(Request $request, SessionInterface $session) { Util::checkUserIsLoggedInAndRedirect(); $menuSelectedCategory = 'user'; $sectionPageTitle = $session->get('client/settings/title_name') . ' / ' . SystemProduct::SYS_PRODUCT_YONGO_NAME . ' / Roles'; return $this->render(__DIR__ . '/../../../Resources/views/administration/role/List.php', get_defined_vars()); }
/** * Handles the Shortcode for: `[s2Get /]`. * * @package s2Member\s2Get * @since 3.5 * * @attaches-to ``add_shortcode("s2Get");`` * * @param array $attr An array of Attributes. * @param string $content Content inside the Shortcode. * @param string $shortcode The actual Shortcode name itself. * @return mixed Value of the requested data, or null on failure. * * @todo Prevent this routine from potentially returning objects/arrays? */ public static function sc_get_details($attr = FALSE, $content = FALSE, $shortcode = FALSE) { foreach (array_keys(get_defined_vars()) as $__v) { $__refs[$__v] =& ${$__v}; } do_action("ws_plugin__s2member_before_sc_get_details", get_defined_vars()); unset($__refs, $__v); $attr = c_ws_plugin__s2member_utils_strings::trim_qts_deep((array) $attr); // Force array; trim quote entities. $attr = shortcode_atts(array("constant" => "", "user_field" => "", "user_option" => "", "user_id" => ""), $attr); foreach (array_keys(get_defined_vars()) as $__v) { $__refs[$__v] =& ${$__v}; } do_action("ws_plugin__s2member_before_sc_get_details_after_shortcode_atts", get_defined_vars()); unset($__refs, $__v); if ($attr["constant"] && defined($attr["constant"])) { if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() || preg_match("/^S2MEMBER_/i", $attr["constant"])) { $get = constant($attr["constant"]); } } else { if ($attr["user_field"] && (is_user_logged_in() || $attr["user_id"])) { $get = c_ws_plugin__s2member_utils_users::get_user_field($attr["user_field"], (int) $attr["user_id"]); } else { if ($attr["user_option"] && (is_user_logged_in() || $attr["user_id"])) { $get = get_user_option($attr["user_option"], (int) $attr["user_id"]); } } } return apply_filters("ws_plugin__s2member_sc_get_details", isset($get) ? $get : null, get_defined_vars()); }
/** * s2Member's PayPal® Auto-Return/PDT handler ( inner processing routine ). * * @package s2Member\PayPal * @since 110720 * * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}. * @return array|bool The original ``$paypal`` array passed in ( extracted ) from ``$vars``, or false when conditions do NOT apply. */ public static function cp($vars = array()) { extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */ /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__s2member_during_paypal_return_before_explicit_x_preview", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ $paypal["s2member_log"][] = "Test preview of Return Page `proxy_use`: ( `x_preview` )."; /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__s2member_during_paypal_return_during_explicit_x_preview", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ if ($custom_success_redirection) { /* Using a custom success redirection URL? */ $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection . ". Test preview of Return Page `proxy_use`: ( `x_preview` )."; } else { /* Else we use the default redirection URL for this scenario, which is the Home Page. */ $paypal["s2member_log"][] = "Redirecting Customer to the Home Page. Test preview of Return Page `proxy_use`: ( `x_preview` )."; } /**/ echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], sprintf(_x('<strong>Thank you! ( this is a preview, no action necessary ).</strong><br /><br />* Note: each of your Customers are returned back to your site immediately after they complete checkout. This Return Page displays a message and instructions for the Customer. s2Member may change the message and instructions dynamically, based on what the Customer is actually doing <em>( i.e. based on the type of transaction that is taking place )</em>.<br /><br /><em>* With <a href="%s" target="_blank">s2Member Pro</a> installed, it is possible to customize this Return Page in various ways.</em>', "s2member-front", "s2member"), esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Module / Prices"))), _x("Continue ( Click Here )", "s2member-front", "s2member"), $custom_success_redirection ? $custom_success_redirection : home_url("/")); /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__s2member_during_paypal_return_after_explicit_x_preview", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ return apply_filters("c_ws_plugin__s2member_paypal_return_in_proxy_x_preview", $paypal, get_defined_vars()); }
/** * s2Member's PayPal Auto-Return/PDT handler (inner processing routine). * * @package s2Member\PayPal * @since 110720 * * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}. * @return array|bool The original ``$paypal`` array passed in (extracted) from ``$vars``, or false when conditions do NOT apply. */ public static function cp($vars = array()) { extract($vars, EXTR_OVERWRITE | EXTR_REFS); foreach (array_keys(get_defined_vars()) as $__v) { $__refs[$__v] =& ${$__v}; } do_action("ws_plugin__s2member_during_paypal_return_before_explicit_x_preview", get_defined_vars()); unset($__refs, $__v); $paypal["s2member_log"][] = "Test preview of Return Page `proxy_use`: ( `x_preview` )."; foreach (array_keys(get_defined_vars()) as $__v) { $__refs[$__v] =& ${$__v}; } do_action("ws_plugin__s2member_during_paypal_return_during_explicit_x_preview", get_defined_vars()); unset($__refs, $__v); if ($custom_success_redirection) { $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection . "."; wp_redirect($custom_success_redirection); } else { $paypal["s2member_log"][] = "Redirecting Customer to the Home Page (after displaying preview information)."; echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], sprintf(_x('<strong>Thank you! (this is a preview, no action necessary).</strong><br /><br />* Note: each of your Customers are returned back to your site immediately after they complete checkout. This Return Page displays a message and instructions for the Customer. s2Member may change the message and instructions dynamically, based on what the Customer is actually doing <em>(i.e., based on the type of transaction that is taking place)</em>.<br /><br /><em>* With <a href="%s" target="_blank">s2Member Pro</a> installed, it is possible to customize this Return Page in various ways.</em>', "s2member-front", "s2member"), esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Add-on / Prices"))), _x("Continue (Click Here)", "s2member-front", "s2member"), home_url("/")); } foreach (array_keys(get_defined_vars()) as $__v) { $__refs[$__v] =& ${$__v}; } do_action("ws_plugin__s2member_during_paypal_return_after_explicit_x_preview", get_defined_vars()); unset($__refs, $__v); return apply_filters("c_ws_plugin__s2member_paypal_return_in_proxy_x_preview", $paypal, get_defined_vars()); }
public function indexAction(Request $request, SessionInterface $session) { Util::checkUserIsLoggedInAndRedirect(); $Id = $request->get('id'); $resolutions = $this->getRepository(IssueSettings::class)->getAllIssueSettings('resolution', $session->get('client/id')); return $this->render(__DIR__ . '/../../../../Resources/views/administration/issue/resolution/DeleteConfirm.php', get_defined_vars()); }
public function indexAction(Request $request, SessionInterface $session) { Util::checkUserIsLoggedInAndRedirect(); $menuSelectedCategory = 'system'; $emptyName = false; $eventId = $request->get('id'); $event = $this->getRepository(IssueEvent::class)->getById($eventId); if ($event['client_id'] != $session->get('client/id')) { return new RedirectResponse('/general-settings/bad-link-access-denied'); } if ($request->request->has('edit_event')) { $name = Util::cleanRegularInputField($request->request->get('name')); $description = Util::cleanRegularInputField($request->request->get('description')); if (empty($name)) { $emptyName = true; } if (!$emptyName) { $currentDate = Util::getServerCurrentDateTime(); $this->getRepository(IssueEvent::class)->updateById($eventId, $name, $description, $currentDate); $this->getLogger()->addInfo('UPDATE Yongo Event ' . $name, $this->getLoggerContext()); return new RedirectResponse('/yongo/administration/events'); } } $sectionPageTitle = $session->get('client/settings/title_name') . ' / ' . SystemProduct::SYS_PRODUCT_YONGO_NAME . ' / Update Event'; return $this->render(__DIR__ . '/../../../Resources/views/administration/event/edit.php', get_defined_vars()); }
public function index() { $type = Param::get('type', self::TYPE_THREAD); $query = trim_collapse(Param::get('query')); $page = Param::get('page', 1); $pagination = new SimplePagination($page, self::RESULTS_PERPAGE); if (!$query) { redirect(APP_URL); } $results = new stdClass(); switch ($type) { case self::TYPE_THREAD: $results = Thread::search($query, $pagination->start_index - 1, $pagination->count + 1); // Get other info for each thread foreach ($results->result as $thread) { $thread->creator = User::getByID($thread->user_id); $thread->category = Category::getName($thread->category_id); $thread->replies_count = Comment::countAll($thread->id); } break; case self::TYPE_COMMENT: $results = Comment::search($query, $pagination->start_index - 1, $pagination->count + 1); break; case self::TYPE_USER: $results = User::search($query, $pagination->start_index - 1, $pagination->count + 1); break; default: throw new PageNotFoundException(); break; } $pagination->checkLastPage($results->result); $pages = ceil($results->total_result / self::RESULTS_PERPAGE); $title = "Search: '{$query}'"; $this->set(get_defined_vars()); }
function usingFixedArgSet($arg1, $arg2, $arg3) { echo "Defined arguments:\r\n"; var_dump(get_defined_vars()); echo "\r\nAll arguments:\r\n"; var_dump(func_get_args()); }
/** * s2Member's PayPal IPN handler (inner processing routine). * * @package s2Member\PayPal * @since 110720 * * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_notify_in::paypal_notify()}. * @return array|bool The original ``$paypal`` array passed in (extracted) from ``$vars``, or false when conditions do NOT apply. */ public static function cp($vars = array()) { extract($vars, EXTR_OVERWRITE | EXTR_REFS); // Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. if (!empty($paypal["txn_type"]) && preg_match("/^virtual_terminal\$/i", $paypal["txn_type"])) { foreach (array_keys(get_defined_vars()) as $__v) { $__refs[$__v] =& ${$__v}; } do_action("ws_plugin__s2member_during_paypal_notify_before_virtual_terminal", get_defined_vars()); unset($__refs, $__v); if (!get_transient($transient_ipn = "s2m_ipn_" . md5("s2member_transient_" . $_paypal_s)) && set_transient($transient_ipn, time(), 31556926 * 10)) { $paypal["s2member_log"][] = "s2Member `txn_type` identified as ( `virtual_terminal` )."; $processing = $during = true; // Yes, we ARE processing this. $paypal["s2member_log"][] = "The `txn_type` does not require any action on the part of s2Member."; foreach (array_keys(get_defined_vars()) as $__v) { $__refs[$__v] =& ${$__v}; } do_action("ws_plugin__s2member_during_paypal_notify_during_virtual_terminal", get_defined_vars()); unset($__refs, $__v); } else { $paypal["s2member_log"][] = "Not processing. Duplicate IPN."; $paypal["s2member_log"][] = "s2Member `txn_type` identified as ( `virtual_terminal` )."; $paypal["s2member_log"][] = "Duplicate IPN. Already processed. This IPN will be ignored."; } foreach (array_keys(get_defined_vars()) as $__v) { $__refs[$__v] =& ${$__v}; } do_action("ws_plugin__s2member_during_paypal_notify_after_virtual_terminal", get_defined_vars()); unset($__refs, $__v); return apply_filters("c_ws_plugin__s2member_paypal_notify_in_virtual_terminal", $paypal, get_defined_vars()); } else { return apply_filters("c_ws_plugin__s2member_paypal_notify_in_virtual_terminal", false, get_defined_vars()); } }
/** * Registers Widgets. * * @package s2Member\Widgets * @since 1.5 * * @attaches-to ``add_action("widgets_init");`` * * @return null */ public static function login_widget_register() { do_action("ws_plugin__s2member_pro_login_widget_before_register", get_defined_vars()); register_widget("c_ws_plugin__s2member_pro_login_widget"); do_action("ws_plugin__s2member_pro_login_widget_after_register", get_defined_vars()); return; }
public function indexAction(Request $request, SessionInterface $session) { Util::checkUserIsLoggedInAndRedirect(); $groupId = $request->get('id'); $group = $this->getRepository(UbirimiGroup::class)->getMetadataById($groupId); return $this->render(__DIR__ . '/../../../Resources/views/administration/group/DeleteConfirm.php', get_defined_vars()); }
function lang_load($p_lang) { global $g_lang_strings, $g_active_language; $g_active_language = $p_lang; if (isset($g_lang_strings[$p_lang])) { return; } if (!lang_language_exists($p_lang)) { return; } $t_lang_dir = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR; require_once $t_lang_dir . 'strings_' . $p_lang . '.txt'; # Allow overriding strings declared in the language file. # custom_strings_inc.php can use $g_active_language $t_custom_strings = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'custom_strings_inc.php'; if (file_exists($t_custom_strings)) { require $t_custom_strings; # this may be loaded multiple times, once per language } $t_vars = get_defined_vars(); foreach (array_keys($t_vars) as $t_var) { $t_lang_var = ereg_replace('^s_', '', $t_var); if ($t_lang_var != $t_var || 'MANTIS_ERROR' == $t_var) { $g_lang_strings[$p_lang][$t_lang_var] = ${$t_var}; } } }
public function indexAction(Request $request, SessionInterface $session) { Util::checkUserIsLoggedInAndRedirect(); $projectId = $request->get('id'); $project = $this->getRepository(YongoProject::class)->getById($projectId); $emptyName = false; $alreadyExists = false; if ($request->request->has('confirm_new_release')) { $name = Util::cleanRegularInputField($request->request->get('name')); $description = Util::cleanRegularInputField($request->request->get('description')); if (empty($name)) { $emptyName = true; } $releasesDuplicate = $this->getRepository(YongoProject::class)->getVersionByName($projectId, $name); if ($releasesDuplicate) { $alreadyExists = true; } if (!$emptyName && !$alreadyExists) { $currentDate = Util::getServerCurrentDateTime(); $this->getRepository(YongoProject::class)->addVersion($projectId, $name, $description, $currentDate); $this->getLogger()->addInfo('ADD Project Version ' . $name, $this->getLoggerContext()); return new RedirectResponse('/yongo/administration/project/versions/' . $projectId); } } $menuSelectedCategory = 'project'; $sectionPageTitle = $session->get('client/settings/title_name') . ' / ' . SystemProduct::SYS_PRODUCT_YONGO_NAME . ' / Create Project Version'; return $this->render(__DIR__ . '/../../../../Resources/views/administration/project/version/Add.php', get_defined_vars()); }
/** * Configure all of the required Hooks/Filters for columns & CSS. * * @package optimizeMember\Lock_Icons * @since 1.5 * * @attaches-to ``add_action("admin_init");`` * * @return null */ public static function configure_lock_icons() { global $wp_post_types, $wp_taxonomies; /* Global references. */ /**/ do_action("ws_plugin__optimizemember_pro_before_configure_lock_icons", get_defined_vars()); /**/ add_action("admin_head", "c_ws_plugin__optimizemember_pro_lock_icons_in::_lock_icons_echo_css"); /**/ add_filter("manage_edit-post_tag_columns", "c_ws_plugin__optimizemember_pro_lock_icons_in::_lock_icons_return_column", 11, 1); add_filter("manage_post_tag_custom_column", "c_ws_plugin__optimizemember_pro_lock_icons_in::_lock_icons_return_value_tags", 11, 3); /**/ add_filter("manage_edit-category_columns", "c_ws_plugin__optimizemember_pro_lock_icons_in::_lock_icons_return_column", 11, 1); add_filter("manage_category_custom_column", "c_ws_plugin__optimizemember_pro_lock_icons_in::_lock_icons_return_value_categories", 11, 3); /**/ add_filter("manage_page_posts_columns", "c_ws_plugin__optimizemember_pro_lock_icons_in::_lock_icons_return_column", 11, 1); add_action("manage_page_posts_custom_column", "c_ws_plugin__optimizemember_pro_lock_icons_in::_lock_icons_echo_value_pages", 11, 2); /**/ if (is_array($wp_post_types) && !empty($wp_post_types)) { /* All; including Custom Post Types; excluding Pages. */ foreach (array_keys($wp_post_types) as $type) { if ($type !== "page") { add_filter("manage_" . $type . "_posts_columns", "c_ws_plugin__optimizemember_pro_lock_icons_in::_lock_icons_return_column", 11, 1); add_action("manage_" . $type . "_posts_custom_column", "c_ws_plugin__optimizemember_pro_lock_icons_in::_lock_icons_echo_value_post_types", 11, 2); } } } /**/ do_action("ws_plugin__optimizemember_pro_after_configure_lock_icons", get_defined_vars()); /**/ return; /* Return for uniformity. */ }
public function indexAction(Request $request, SessionInterface $session) { Util::checkUserIsLoggedInAndRedirect(); $tagId = $request->get('id'); $tag = $this->getRepository(Tag::class)->getById($tagId); if ($tag['user_id'] != $session->get('user/id')) { return new RedirectResponse('/general-settings/bad-link-access-denied'); } $emptyName = false; $tagExists = false; if ($request->request->has('edit_tag')) { $name = Util::cleanRegularInputField($request->request->get('name')); $description = Util::cleanRegularInputField($request->request->get('description')); if (empty($name)) { $emptyName = true; } // check for duplication $tagDuplicate = $this->getRepository(Tag::class)->getByNameAndUserId($session->get('user/id'), mb_strtolower($name), $tagId); if ($tagDuplicate) { $tagExists = true; } if (!$tagExists && !$emptyName) { $date = Util::getServerCurrentDateTime(); $this->getRepository(Tag::class)->updateById($tagId, $name, $description, $date); $this->getLogger()->addInfo('UPDATE NOTEBOOK tag ' . $name, $this->getLoggerContext()); return new RedirectResponse('/quick-notes/tag/all'); } } $menuSelectedCategory = 'tags'; $sectionPageTitle = $session->get('client/settings/title_name') . ' / ' . SystemProduct::SYS_PRODUCT_QUICK_NOTES_NAME . ' / Notebook: ' . $tag['name'] . ' / Update'; return $this->render(__DIR__ . '/../../Resources/views/Tag/Edit.php', get_defined_vars()); }
public function indexAction(Request $request, SessionInterface $session) { if (Util::checkUserIsLoggedIn()) { $selectedProjectId = $session->get('selected_project_id'); } else { $httpHOST = Util::getHttpHost(); $clientId = $this->getRepository(UbirimiClient::class)->getByBaseURL($httpHOST, 'array', 'id'); $loggedInUserId = null; $selectedProjectId = null; } if ($session->get('selected_product_id') == SystemProduct::SYS_PRODUCT_YONGO) { $urlPrefix = '/yongo/project/'; $projectsMenu = $this->getRepository(UbirimiClient::class)->getProjectsByPermission($session->get('client/id'), $session->get('user/id'), Permission::PERM_BROWSE_PROJECTS, 'array'); } else { $urlPrefix = '/helpdesk/customer-portal/project/'; $projectsMenu = $this->getRepository(UbirimiClient::class)->getProjects($session->get('client/id'), 'array', null, 1); } $selectedProjectMenu = null; if ($selectedProjectId) { $selectedProjectMenu = $this->getRepository(YongoProject::class)->getById($selectedProjectId); } $hasGlobalAdministrationPermission = $this->getRepository(UbirimiUser::class)->hasGlobalPermission($session->get('client/id'), $session->get('user/id'), GlobalPermission::GLOBAL_PERMISSION_YONGO_ADMINISTRATORS); $hasGlobalSystemAdministrationPermission = $this->getRepository(UbirimiUser::class)->hasGlobalPermission($session->get('client/id'), $session->get('user/id'), GlobalPermission::GLOBAL_PERMISSION_YONGO_SYSTEM_ADMINISTRATORS); return $this->render(__DIR__ . '/../../Resources/views/menu/Projects.php', get_defined_vars()); }