示例#1
0
 function getData()
 {
     // get srId from URL
     $srID = \RightNow\Utils\Url::getParameter('sr_id');
     if (!($srID = intval(\RightNow\Utils\Url::getParameter('sr_id')))) {
         // get i_id from URL
         $incidentID = \RightNow\Utils\Url::getParameter('i_id');
         if (!($incidentID = intval(\RightNow\Utils\Url::getParameter('i_id')))) {
             echo $this->reportError(sprintf('Invalid ID'));
             return false;
         }
         // fetch Incident from DB by ID
         if ($incident = RNCPHP\Incident::fetch(intval($incidentID))) {
             $srID = $incident->CustomFields->Accelerator->ebs_sr_id;
         }
     }
     if (!$srID) {
         echo $this->reportError(sprintf('Invalid Service Request ID'));
         return false;
     }
     // render to js
     $this->data['js']['sr_id'] = $srID;
     $this->data['js']['ext_server_type'] = $this->extServerType;
     $this->data['js']['development_mode'] = IS_DEVELOPMENT;
     return parent::getData();
 }
示例#2
0
 function getData()
 {
     // get srId from URL
     if (!($srID = \RightNow\Utils\Url::getParameter('sr_id'))) {
         echo $this->reportError('Invalid Service Request ID');
         return false;
     }
     // render to js
     $this->data['js']['sr_id'] = $srID;
     $this->data['js']['ext_server_type'] = $this->extServerType;
     $this->data['js']['development_mode'] = IS_DEVELOPMENT;
 }
示例#3
0
 function getProductCategoryValues()
 {
     $prodValue = Url::getParameter('p');
     $catValue = Url::getParameter('c');
     if ($prodValue) {
         if (strlen(trim($prodValue)) === 0) {
             $prodValue = null;
         } else {
             // QA 130606-000085. It's possible for p/c to be CSV, with the most specific value to be at the end.
             $prodValues = explode(',', $prodValue);
             $prodValue = end($prodValues);
         }
     }
     if ($catValue) {
         if (strlen(trim($catValue)) === 0) {
             $catValue = null;
         } else {
             $catValues = explode(',', $catValue);
             $catValue = end($catValues);
         }
     }
     // If either prod/cat is specified in URL, keep the URL specified value(s).
     // If only one or none of prod/cat is specified in URL, attempt to fill in whichever ones aren't by page context (answer/incident).
     if (!$prodValue || !$catValue) {
         if ($answerID = Url::getParameter('a_id')) {
             if ($answer = $this->CI->model('Answer')->get($answerID)->result) {
                 if (!$prodValue && $answer->Products && ($prodValue = $this->CI->model('Answer')->getFirstBottomMostProduct($answerID)->result)) {
                     $prodValue = $prodValue['ID'];
                 }
                 if (!$catValue && $answer->Categories && ($catValue = $this->CI->model('Answer')->getFirstBottomMostCategory($answerID)->result)) {
                     $catValue = $catValue['ID'];
                 }
             }
         } else {
             if ($incidentID = Url::getParameter('i_id')) {
                 if ($incident = $this->CI->model('Incident')->get($incidentID)->result) {
                     if (!$prodValue && $incident->Product) {
                         $prodValue = $incident->Product->ID;
                     }
                     if (!$catValue && $incident->Category) {
                         $catValue = $incident->Category->ID;
                     }
                 }
             }
         }
     }
     return array($prodValue, $catValue);
 }
示例#4
0
 /**
  * GetData function of the widget
  * @return null
  */
 function getData()
 {
     // get srID
     if (!($srID = intval(URL::getParameter('sr_id')))) {
         $incidentID = URL::getParameter('i_id');
         if (!($incidentID = intval(URL::getParameter('i_id')))) {
             echo $this->reportError('Invalid i_id');
             return;
         }
         $incident = RNCPHP\Incident::fetch(intval($incidentID));
         if (!is_null($incident)) {
             $srID = $incident->CustomFields->Accelerator->ebs_sr_id;
         }
     }
     // render data to javascript
     $this->data['js']['sr_id'] = $srID;
     $this->data['js']['ext_server_type'] = $this->extServerType;
     $this->data['js']['development_mode'] = IS_DEVELOPMENT;
 }
示例#5
0
        <br/>
        <div class="rn_Column rn_LeftColumn rn_ThirdPartyLogin">
            <h2>#rn:msg:SERVICES_MSG#</h2>
            <br/>#rn:msg:LOG_IN_OR_REGISTER_USING_ELLIPSIS_MSG#<br/>
            <rn:widget path="login/OpenLogin" display_in_dialog="false"/> <?php 
/* Attributes Default to Facebook */
?>
            <rn:widget path="login/OpenLogin" display_in_dialog="false" controller_endpoint="/ci/openlogin/oauth/authorize/twitter" label_service_button="Twitter" label_process_explanation="#rn:msg:CLICK_BTN_TWITTER_LOG_TWITTER_MSG#" label_login_button="#rn:msg:LOG_IN_USING_TWITTER_LBL#"/>
            <rn:widget path="login/OpenLogin" display_in_dialog="false" controller_endpoint="/ci/openlogin/openid/authorize/google" label_service_button="Google" label_process_explanation="#rn:msg:CLICK_BTN_GOOGLE_LOG_GOOGLE_VERIFY_MSG#" label_login_button="#rn:msg:LOG_IN_USING_GOOGLE_LBL#"/>
            <rn:widget path="login/OpenLogin" display_in_dialog="false" controller_endpoint="/ci/openlogin/openid/authorize/yahoo" label_service_button="Yahoo" label_process_explanation="#rn:msg:CLICK_BTN_YAHOO_LOG_YAHOO_VERIFY_MSG#" label_login_button="#rn:msg:LOG_IN_USING_YAHOO_LBL#"/>
            <rn:widget path="login/OpenLogin" display_in_dialog="false" controller_endpoint="/ci/openlogin/openid/authorize" label_service_button="AOL" openid="true" preset_openid_url="http://openid.aol.com/[username]" openid_placeholder="[#rn:msg:YOUR_AOL_USERNAME_LBL#]" label_process_explanation="#rn:msg:YOULL_AOL_LOG_AOL_VERIFY_SEND_YOULL_MSG#" label_login_button="#rn:msg:LOG_IN_USING_YOUR_AOL_ACCOUNT_LBL#"/>
            <rn:widget path="login/OpenLogin" display_in_dialog="false" controller_endpoint="/ci/openlogin/openid/authorize" label_service_button="MyOpenID" openid="true" preset_openid_url="http://[username].myopenid.com" openid_placeholder="[#rn:msg:YOUR_MYOPENID_USERNAME_LBL#]" label_process_explanation="#rn:msg:YOULL_MYOPENID_LOG_MYOPENID_VERIFY_MSG#" label_login_button="#rn:msg:LOG_IN_USING_MYOPENID_LBL#"/>
            <rn:widget path="login/OpenLogin" display_in_dialog="false" controller_endpoint="/ci/openlogin/openid/authorize" label_service_button="Wordpress" openid="true" preset_openid_url="http://[username].wordpress.com" openid_placeholder="[#rn:msg:YOUR_WORDPRESS_USERNAME_LBL#]" label_process_explanation="#rn:msg:YOULL_LOG_ACCT_WORDPRESS_TAB_ENTER_MSG#" label_login_button="#rn:msg:LOG_USING_YOUR_WORDPRESS_ACCOUNT_LBL#"/>
            <rn:widget path="login/OpenLogin" display_in_dialog="false" controller_endpoint="/ci/openlogin/openid/authorize" label_service_button="OpenID" openid="true" openid_placeholder="http://[provider]" label_process_explanation="#rn:msg:YOULL_OPENID_PROVIDER_LOG_PROVIDER_MSG#" label_login_button="#rn:msg:LOG_IN_USING_THIS_OPENID_PROVIDER_LBL#"/>
        </div>
        <span class="rn_MiddleBuffer">#rn:msg:OR_CAPS_LBL#</span>
        <div class="rn_Column rn_RightColumn">
            <h2>#rn:msg:LOG_IN_WITH_AN_EXISTING_ACCOUNT_LBL#</h2><br/>
            <rn:widget path="login/LoginForm" redirect_url="/app/account/overview" initial_focus="true"/>
            <br/>
            <a href="/app/#rn:config:CP_ACCOUNT_ASSIST_URL##rn:session#">#rn:msg:FORGOT_YOUR_USERNAME_OR_PASSWORD_MSG#</a>
            <br/><br/>
            #rn:msg:NOT_REGISTERED_YET_MSG#
            <a href="/app/utils/create_account/redirect/<?php 
echo urlencode(\RightNow\Utils\Url::getParameter('redirect'));
?>
#rn:session#">#rn:msg:SIGN_UP_LBL#</a>
        </div>
    </div>
</div>
示例#6
0
<rn:meta title="#rn:msg:ERROR_LBL#" template="standard.php" login_required="false" />

<?php 
list($errorTitle, $errorMessage) = \RightNow\Utils\Framework::getErrorMessageFromCode(\RightNow\Utils\Url::getParameter('error_id'));
?>
<div id="rn_PageTitle" class="rn_ErrorPage">
    <h1><?php 
echo $errorTitle;
?>
</h1>
</div>
<div id="rn_PageContent" class="rn_ErrorPage">
    <div class="rn_Padding">
        <p><?php 
echo $errorMessage;
?>
</p>
    </div>
</div>
示例#7
0
 *  OSvC release: 15.8 (August 2015)
 *  EBS release: 12.1.3
 *  reference: 150505-000099, 150420-000127
 *  date: Thu Nov 12 00:52:36 PST 2015

 *  revision: rnw-15-11-fixes-release-1
 *  SHA1: $Id: 839ca75e973c5bd96bd3f36f8c7fe220f1787841 $
 * *********************************************************************************************
 *  File: error.php
 * ****************************************************************************************** */
-->

<rn:meta title="#rn:msg:ERROR_LBL#" template="standard.php" login_required="false" />

<?php 
$errorID = \RightNow\Utils\Url::getParameter('error_id');
$errorID = intval($errorID);
switch ($errorID) {
    case 8:
        // configuration error
        list($errorTitle, $errorMessage) = array("Configuration Error", 'The site name is not set in configuration verb CUSTOM_CFG_Accel_' . 'Ext_Integrations');
        break;
    case 9:
        // invalid i_id
        list($errorTitle, $errorMessage) = array("Permission Denied", "An illegal value was received for the parameter 'i_id'");
        break;
    case 10:
        // invalid sr_id
        list($errorTitle, $errorMessage) = array("Permission Denied", "An illegal value was received for the parameter 'sr_id'");
        break;
    case 11:
示例#8
0
 /**
  * CheckBeforeLoadingPageHook for Siebel
  */
 private function checkBeforeLoadingPageHookForSiebel()
 {
     $url = $_SERVER['REQUEST_URI'];
     if (Text::beginsWith($url, '/app/account/questions/detail/i_id')) {
         // check if i_id in URL is valid
         $incidentID = Url::getParameter('i_id');
         if (!$incidentID || !is_numeric($incidentID)) {
             $this->log->error('Invalid i_id#{$incidentID}', __METHOD__, array(null, $this->contact));
             Url::redirectToErrorPage(9);
         }
         // check if the linked SR has been closed
         if ($incident = RNCPHP\Incident::fetch(intval($incidentID))) {
             if ($incident->StatusWithType->Status->ID === 2) {
                 // solved
                 return;
             }
             if ($srID = $incident->CustomFields->Accelerator->siebel_sr_id) {
                 $srDetail = $this->checkServiceRequest($srID);
                 // if the status is closed, redirect to the read only page
                 if ($srDetail['STATUS'] === 'Closed' && Url::getParameter('readonly') !== "1") {
                     $this->log->debug("Redirect to read-only page", __METHOD__, array(null, $this->contact));
                     header("Location: /app/account/questions/detail/i_id/{$incidentID}/readonly/1" . Url::sessionParameter());
                     exit;
                 }
             }
         }
         return;
     }
     // sr detail page
     if (Text::beginsWith($url, '/app/account/questions/detail/sr_id') === true) {
         $srID = Url::getParameter('sr_id');
         // check SR
         $srDetail = $this->checkServiceRequest($srID);
         // check if SR has already been associated with an Incident in RN.
         // if so, redirect to the corresponding Incident detail page
         $integrationID = $srDetail['INTEGRATIONID'];
         $integrationID = explode(',', $integrationID);
         $incidentID = $integrationID[0];
         if ($incidentID) {
             $this->log->debug('Redirect to incident#{$incidentID} page', __METHOD__, array(null, $this->contact));
             header("Location: /app/account/questions/detail/i_id/{$incidentID}" . Url::sessionParameter());
             exit;
         }
         // if the status is closed, redirect to the read only page
         if ($srDetail['STATUS'] === 'Closed' && Url::getParameter('readonly') !== "1") {
             $this->log->debug("Redirect to read-only page", __METHOD__, array(null, $this->contact));
             header("Location: /app/account/questions/detail/sr_id/{$srID}/readonly/1" . Url::sessionParameter());
             exit;
         }
     }
 }
示例#9
0
 /**
  * Execute the following check before loading page
  * - SR doesn't exist
  * - user doesn't have the right to access the SR
  * - SR has been closed
  */
 private function checkBeforeLoadingPageHookForEbs()
 {
     $url = $_SERVER['REQUEST_URI'];
     // incident detail page
     if (Text::beginsWith($url, '/app/account/questions/detail/i_id')) {
         // check if the i_id is valid
         $incidentID = Url::getParameter('i_id');
         if (!$incidentID || !is_numeric($incidentID)) {
             $this->log->error("Invalid i_id#{$incidentID}", __METHOD__, array(null, $this->contact));
             Url::redirectToErrorPage(9);
         }
         // check if the linked SR has been closed
         if ($incident = RNCPHP\Incident::fetch(intval($incidentID))) {
             if ($incident->StatusWithType->Status->ID === 2) {
                 // solved
                 return;
             }
             if ($srID = $incident->CustomFields->Accelerator->ebs_sr_id) {
                 $srDetail = $this->checkServiceRequest($srID);
                 // if the status is closed, redirect to the read only page
                 if ($srDetail['INCIDENT_STATUS'] === 'Closed' && Url::getParameter('readonly') !== "1") {
                     $this->log->debug("Redirect to read-only page", __METHOD__, array(null, $this->contact));
                     header("Location: /app/account/questions/detail/i_id/{$incidentID}/readonly/1" . Url::sessionParameter());
                     exit;
                 }
             }
         }
         return;
     }
     // sr detail page
     if (Text::beginsWith($url, '/app/account/questions/detail/sr_id')) {
         $srID = Url::getParameter('sr_id');
         // check SR
         $srDetail = $this->checkServiceRequest($srID);
         // redirect to the incident detail page if the SR has already associated with an incident
         $incidentID = $srDetail['EXTATTRIBUTE15'];
         if ($incidentID) {
             $this->log->debug("Redirect to incident#{$incidentID} page", __METHOD__, array(null, $this->contact));
             header("Location: /app/account/questions/detail/i_id/{$incidentID}" . Url::sessionParameter());
             exit;
         }
         // if the status is closed, redirect to the read only page
         if ($srDetail['INCIDENT_STATUS'] === 'Closed' && Url::getParameter('readonly') !== "1") {
             $this->log->debug("Redirect to read-only page", __METHOD__, array(null, $this->contact));
             header("Location: /app/account/questions/detail/sr_id/{$srID}/readonly/1" . Url::sessionParameter());
             exit;
         }
     }
 }