示例#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;
 }
 /**
  * Get the endpoint, username and password of the current site from custom 
  * Config Verb CUSTOM_CFG_EBS_Web_Service_Endpoint.
  * @return null
  */
 function checkExtIntegrationConfigVerb()
 {
     $url = $_SERVER['REQUEST_URI'];
     if (Text::beginsWith($url, '/app/error/')) {
         return;
     }
     // check if CUSTOM_CFG_EBS_Web_Service_Endpoint is defined in the current site
     if (IS_DEVELOPMENT === true && !defined('CUSTOM_CFG_Accel_Ext_Integrations')) {
         $this->log->error('CUSTOM_CFG_' . 'Accel_Ext_Integrations is not set', __METHOD__, array(null, $this->contact));
         Url::redirectToErrorPage(13);
     }
     // get the value of config verb CUSTOM_CFG_Accel_Ext_Integrations
     $config = RNCPHP\Configuration::fetch(CUSTOM_CFG_Accel_Ext_Integrations);
     $configVerb = json_decode($config->Value, true);
     if (is_null($configVerb)) {
         $this->log->error('Unable to get the value of CUSTOM_CFG_' . 'Accel_Ext_Integrations', __METHOD__, array(null, $this->contact), $config);
         Url::redirectToErrorPage(13);
     }
     // check if current site is defined in the config rnt_host
     $server = \RightNow\Utils\Config::getConfig(OE_WEB_SERVER);
     $hosts = $configVerb['hosts'];
     if (is_null($hosts)) {
         $this->log->error('Unable to find hosts inside CUSTOM_CFG_' . 'Accel_Ext_Integrations', __METHOD__, array(null, $this->contact), var_export($configVerb, true));
         Url::redirectToErrorPage(8);
     }
     foreach ($hosts as $host) {
         if ($server === $host['rnt_host']) {
             $this->extConfigVerb = $host;
             $this->extServerType = $host['integration']['server_type'];
             $this->rntHost = $host['rnt_host'];
             $this->ebsDefaultSROwnerID = $host['integration']['ebs_default_sr_owner_id'];
             return;
         }
     }
     // if no config verb match the current host
     $this->log->error("CUSTOM_CFG_Accel_Ext_Integrations :: host name isn't included in hosts", __METHOD__, array(null, $this->contact));
     Url::redirectToErrorPage(8);
 }
示例#6
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>
示例#7
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>
示例#8
0
 private function verifyFormToken($tokenName = 'f_tok', $tokenSeed = 0)
 {
     if (!Framework::isValidSecurityToken($this->CI->input->post($tokenName), $tokenSeed)) {
         return $this->getResponseObject(array('redirectOverride' => '/app/error/error_id/5', 'sessionParam' => \RightNow\Utils\Url::sessionParameter()), 'is_array', Config::getMessage(FORM_SUBMISSION_TOKEN_MATCH_EXP_LBL));
     }
 }
示例#9
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:
示例#10
0
 /**
  * fetch SR and check if the current user is the owner of the SR
  * @param int $srID Serivce Request ID
  * @return array|null Service Request detail
  */
 private function checkServiceRequest($srID)
 {
     if (!$srID) {
         $this->log->error('Invalid sr_id#{$srID}', __METHOD__, array(null, $this->contact));
         Url::redirectToErrorPage(10);
     }
     // check if contact party id and org id have been set
     if (!$this->CI->utility->validateSiebelContactID($this->contact)) {
         $this->log->error('contact_party_id and/or contact_org_id not provided', __METHOD__, array(null, $this->contact));
         Url::redirectToErrorPage(12);
     }
     // get SR by sr_id
     $getSRResult = $this->CI->model('custom/SiebelServiceRequest')->getSRDetailByID($srID);
     if ($getSRResult->error) {
         $this->log->error('Unable to get SR#{$srID}', __METHOD__, array(null, $this->contact));
         Url::redirectToErrorPage(11);
     }
     // check if the current user is the owner of the SR, if not, redirect to permission deny page
     $srDetail = $getSRResult->result;
     $contactPartyID = $this->contact !== null ? $this->contact->CustomFields->Accelerator->siebel_contact_party_id : null;
     if ($contactPartyID !== $srDetail['CONTACTID']) {
         $this->log->error('Permission Denied', __METHOD__, array(null, $this->contact), "ContactPartyID#{$contactPartyID} doesn't match SR.contactId #{$srDetail['CONTACT_PARTY_ID']}");
         Url::redirectToErrorPage(4);
     }
     return $srDetail;
 }
echo $solution;
?>
</p>
            </div>
        </div>
      </div>
    </div>
</div>
<script type="text/javascript">
    var tags = document.getElementsByTagName('a');
    for (var i=0; i<tags.length; i++)
    {
        var hashLocation = tags[i].href.split("#");
        //Fix anchor links (i.e. href="#Bottom") because of the base tag. Also don't change their target
        if(hashLocation[1] !== undefined && hashLocation[0] === "<?php 
echo \RightNow\Utils\Url::getShortEufBaseUrl(false, '/');
?>
"){
            tags[i].href = "about:blank#" + hashLocation[1];
        }
        else{
            tags[i].target = "_blank";
        }
    }

    tags = document.getElementsByTagName('form');
    for (var i=0; i<tags.length; i++)
    {
        tags[i].onsubmit = function(){alert("<?php 
echo \RightNow\Utils\Config::getMessageJS(DISABLED_FOR_PREVIEW_MSG);
?>
示例#12
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html>
<head>
<title><?php 
echo \RightNow\Utils\Config::getMessage(POLLING_SURVEY_PREVIEW_LBL);
?>
</title>
<link rel="stylesheet" type="text/css" href="<?php 
echo \RightNow\Utils\Url::getYUICodePath('panel/assets/skins/sam/panel.css');
?>
" />
</head>
<body class="yui-skin-sam yui3-skin-sam">
<br />
<!-- survey_id is a fake number, the controller will grab the real survey_id from $_REQUEST -->
<rn:widget path="surveys/Polling" admin_console="true" survey_id="1234567"/>
</body>
</html>
示例#13
0
                <?php 
}
?>
            </div>
        </div>
    </div>
  </div>
</div>
<script type="text/javascript">
    var tags = document.getElementsByTagName('a');
    for (var i=0; i<tags.length; i++)
    {
        var hashLocation = tags[i].href.split("#");
        //Let anchor links stay in the same window but all others should show in a new window due to issues using the dotnet client browser
        if(hashLocation[1] === undefined || hashLocation[0].indexOf("<?php 
echo \RightNow\Utils\Url::getShortEufBaseUrl('sameAsCurrentPage', '/');
?>
") !== 0){
            tags[i].target = "_blank";
        }
    }

    tags = document.getElementsByTagName('form');
    for (var i=0; i<tags.length; i++)
    {
        tags[i].onsubmit = function(){alert("<?php 
echo \RightNow\Utils\Config::getMessageJS(DISABLED_FOR_PREVIEW_MSG);
?>
"); return false;};
    }
</script>