예제 #1
0
파일: main.php 프로젝트: KingNoosh/Teknik
<div class="container">
  <div class="row text-center">
    <div class="col-sm-6 col-sm-offset-3">
    <div class="alert alert-danger">
      <span class="glyphicon glyphicon-warning-sign"></span> The password you entered was incorrect, <a href="#tryagain" onClick="history.go(-1); return false;">Try again.</a></i>
    </div>
    </div>
  </div>
</div>

<?php 
            }
        }
    } else {
        showMe();
    }
}
// End password page
if (!(isset($pass) && sha1($postPass) !== $pass) || $pass == "EMPTY") {
    ?>
<!-- Paste area -->

<div class="container">
  <div class="row">
    <div class="col-md-8">
    <form class="form-horizontal" name="editor" method="post" action="index.php">
    <input type="hidden" name="parent_pid" value="<?php 
    if (isset($page['post']['pid'])) {
        echo $page['post']['pid'];
    }
예제 #2
0
 function ccBrowserInfo($ua = 0)
 {
     if (empty($ua)) {
         $ua = $_SERVER['HTTP_USER_AGENT'];
     }
     $useragent = strtolower($ua);
     // Determine browser and version
     // The order in which we test the agents patterns is important
     // Intentionally ignore Konquerer.  It should show up as Mozilla.
     // post-Netscape Mozilla versions using Gecko show up as Mozilla 5.0
     if (preg_match('/(opera |opera\\/)([0-9]*).([0-9]{1,2})/', $useragent, $matches)) {
     } elseif (preg_match('/(msie )([0-9]*).([0-9]{1,2})/', $useragent, $matches)) {
     } elseif (preg_match('/(mozilla\\/)([0-9]*).([0-9]{1,2})/', $useragent, $matches)) {
     } else {
         $matches[1] = 'unknown';
         $matches[2] = 0;
         $matches[3] = 0;
     }
     switch ($matches[1]) {
         case 'opera/':
         case 'opera ':
             $this->agent = 'OPERA';
             break;
         case 'msie ':
             $this->agent = 'IE';
             break;
         case 'mozilla/':
             $this->agent = 'MOZILLA';
             break;
         case 'unknown':
             $this->agent = 'OTHER';
             break;
         default:
             $this->agent = 'Oops!';
     }
     $this->majorver = $matches[2];
     $this->minorver = $matches[3];
     $this->ver = $matches[2] . '.' . $matches[3];
     // Determine platform
     // This is very incomplete for platforms other than Win/Mac
     if (preg_match('/(win|mac|linux|unix)/', $useragent, $matches)) {
     } else {
         $matches[1] = 'unknown';
     }
     switch ($matches[1]) {
         case 'win':
             $this->platform = 'Win';
             break;
         case 'mac':
             $this->platform = 'Mac';
             break;
         case 'linux':
             $this->platform = 'Linux';
             break;
         case 'unix':
             $this->platform = 'Unix';
             break;
         case 'unknown':
             $this->platform = 'Other';
             break;
         default:
             $this->platform = 'Oops!';
     }
     if ($this->debug) {
         $this - showMe();
     }
 }
예제 #3
0
$requestValidator = new OAuthRequestValidator(ConfigurationManager::AppSettings('AccessToken'), ConfigurationManager::AppSettings('AccessTokenSecret'), ConfigurationManager::AppSettings('ConsumerKey'), ConfigurationManager::AppSettings('ConsumerSecret'));
$serviceContext = new ServiceContext($realmId, $serviceType, $requestValidator);
$serviceContext->IppConfiguration->Message->Response->SerializationFormat = SerializationFormat::Json;
$serviceContext->IppConfiguration->Message->Request->SerializationFormat = SerializationFormat::Json;
$serviceContext->IppConfiguration->BaseUrl->Qbo = ConfigurationManager::BaseURLSettings(strtolower(IntuitServicesType::QBO));
$serviceContext->baseserviceURL = $serviceContext->GetBaseURL();
if (!$serviceContext) {
    exit("Problem while initializing ServiceContext.\n");
}
// Prep Data Services
$dataService = new DataService($serviceContext);
if (!$dataService) {
    exit("Problem while initializing DataService.\n");
}
$result = $dataService->Add(createTransfer());
echo showMe($result);
print_r($result);
################################################################################
# Domain Objects example                                                       #
################################################################################
function createTransfer()
{
    $from = new IPPReferenceType();
    $from->name = "Checking";
    $from->value = 35;
    $to = new IPPReferenceType();
    $to->name = "Savings";
    $to->value = 36;
    $transfer = new IPPTransfer();
    $transfer->FromAccountRef = $from;
    $transfer->ToAccountRef = $to;