Beispiel #1
0
function store_db($url, $con)
{
    $content = file_get_contents($url);
    $json = json_decode($content, true);
    foreach ($json['bugs'] as $item) {
        $id = $item['id'];
        getVariables($id, $con);
    }
}
function smarty_function_moduleEditMenu($params, &$container)
{
    $specialModules = array_flip($container->main->getSpecialModules());
    if (!isset($specialModules[$container->main->selectedTab]) && canUserEditModule($container->main, $container->moduleID)) {
        $result = getVariables($container->moduleID);
        $result .= getMenu($container->main, $container->moduleID);
        return $result;
    } else {
        return '';
    }
}
Beispiel #3
0
function store_db($url, $con, $collection)
{
    $curl_options = array(CURLOPT_URL => $url, CURLOPT_HEADER => 0, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_TIMEOUT => 0, CURLOPT_SSL_VERIFYPEER => 0, CURLOPT_FOLLOWLOCATION => TRUE, CURLOPT_ENCODING => 'gzip,deflate');
    $ch = curl_init();
    curl_setopt_array($ch, $curl_options);
    $output = curl_exec($ch);
    curl_close($ch);
    $arr = json_decode($output, true);
    foreach ($arr['bugs'] as $val) {
        $id = $val['id'];
        getVariables($id, $con, $collection);
    }
}
Beispiel #4
0
<?php

$list_var = getVariables();
foreach ($list_var as $row) {
    define($row['var_name'], html_entity_decode($row['var_value']));
}
Beispiel #5
0
 /**
  * This method process nested function calls that may be in the arguments
  * passed into a higher level function.
  *
  * @param String|\Tbm\Peval\Types\String $arguments
  *
  * @throws \Tbm\Peval\EvaluationException
  * @return \Tbm\Peval\Types\String The arguments with any nested function calls evaluated.
  *
  */
 public function processNestedFunctions(string $arguments)
 {
     $evaluatedArguments = new String();
     // Process nested function calls.
     if ($arguments->length() > 0) {
         $argumentsEvaluator = new Evaluator($this->quoteCharacter, $this->loadMathVariables, $this->loadMathFunctions, $this->loadStringFunctions, $this->processNestedFunctions);
         $this->argumentsEvaluator->setFunctions(getFunctions());
         $this->argumentsEvaluator->setVariables(getVariables());
         $this->argumentsEvaluator->setVariableResolver(getVariableResolver());
         $tokenizer = new ArgumentTokenizer($arguments, EvaluationConstants::FUNCTION_ARGUMENT_SEPARATOR);
         $evaluatedArgumentList = new ArrayList();
         while ($tokenizer . hasMoreTokens()) {
             $argument = $tokenizer->nextToken()->trim();
             try {
                 $argument = $argumentsEvaluator->evaluate1($argument);
             } catch (Exception $e) {
                 throw new EvaluationException($e->getMessage(), $e);
             }
             $evaluatedArgumentList->add($argument);
         }
         $evaluatedArgumentIterator = $evaluatedArgumentList->iterator();
         while ($evaluatedArgumentIterator->valid()) {
             if ($evaluatedArguments->length() > 0) {
                 $evaluatedArguments->append(EvaluationConstants::FUNCTION_ARGUMENT_SEPARATOR);
             }
             $evaluatedArgumentIterator->next();
             $evaluatedArgument = (string) $evaluatedArgumentIterator->current();
             $evaluatedArguments . append($evaluatedArgument);
         }
     }
     return $evaluatedArguments;
 }