Пример #1
0
/**
 * @param $object
 * @param string $name
 * @param bool $attributesOnly
 */
function printr($object, $name = '', $attributesOnly = true)
{
    $console = false;
    if (in_array(php_sapi_name(), array('cli'))) {
        $console = true;
    }
    $classHint = '';
    if ($attributesOnly && (is_array($object) || is_object($object))) {
        if (is_object($object)) {
            $class = get_class($object);
            if (!$name) {
                $name = $class;
            } else {
                $classHint = 'type: ' . $class;
            }
        }
        if (function_exists('getAttributes')) {
            $object = getAttributes($object);
        }
    }
    $bt = debug_backtrace();
    $bp = class_exists('Yii') && !empty(Yii::app()->basePath) ? Yii::app()->basePath : false;
    $file = str_replace($bp, '', $bt[0]['file']);
    if ($console) {
        print $file . ' on line ' . $bt[0]['line'] . " {$name} is: ";
    } else {
        print '<div style="background: #FFFBD6">';
        $nameLine = '';
        if ($name) {
            $nameLine = '<b> <span style="font-size:18px;">' . $name . "</span></b> {$classHint} printr:<br/>";
        }
        print '<span style="font-size:12px;">' . $nameLine . ' ' . $file . ' on line ' . $bt[0]['line'] . '</span>';
        print '<div style="border:1px solid #000;">';
        print '<pre>';
    }
    if (is_array($object)) {
        print_r($object);
    } else {
        var_dump($object);
    }
    if (!$console) {
        print '</pre>';
        echo '</div></div><hr/>';
    }
}
                            class="control-label">  <?php 
    echo getUebersetzung("Bezeichnung", $sprache, $link);
    ?>
</label>
                    </div>
                    <div class="col-sm-5">
                        <label
                            class="control-label"> <?php 
    echo getUebersetzung("Beschreibung", $sprache, $link);
    ?>
</label>
                    </div>
                </div>
                <?php 
    //alle bestehenden attribute auslesen:
    $res = getAttributes();
    while ($d = mysqli_fetch_array($res)) {
        $bezeichnung = $d["Bezeichnung"];
        $beschreibung = $d["Beschreibung"];
        $att_id = $d["PK_ID"];
        ?>
                    <div class="row">
                        <div class="col-sm-5">
                            <input class="form-control" type="text" name="bezeichnung_<?php 
        echo $att_id;
        ?>
"
                                   value="<?php 
        echo $bezeichnung;
        ?>
">
Пример #3
0
     
     <div class="col-sm-2">
         <div class="input-group">
             <div class="srch_heading_text"><h4 style="">Quick Property Search</h4></div>
         </div>
     </div>
     
     
     <div class="col-sm-9">    
     
      <div class="input-group">
          <input type="text" name="unit_name" class="form-control" placeholder="Unit name">
      </div>
     
     
 <?php foreach (getAttributes() as $attribute): ?>
     <div class="input-group">
         
         <?php if(arrIndex($attribute, 'type')=="dropdown"){ ?>
         <select name="attributes[<?php echo arrIndex($attribute, 'id') ?>]" class="form-control">
             <?php 
             foreach(getAttributesValue(arrIndex($attribute, 'id')) as $drpdown)
             {
                 ?>
             <option value="<?php echo $drpdown['id'] ?>"><?php echo $drpdown['value'] ?></option>
                 <?php
             }
             ?>
         </select>
         <?php 
         }
Пример #4
0
$service_url = Mage::getStoreConfig('config_ws_sezione/gruppo_cliente/endpoint');
if (isset($username) && $username != "" && isset($password) && $password != "" && isset($service_url) && $service_url != "") {
    $filename = "catalogo";
    $logFileName = $filename . '.log';
    $filename2 = "catalogoErrore";
    $logFileName2 = $filename2 . '.log';
    $filename3 = "skuNonPresenti";
    $logFileName3 = $filename3 . '.log';
    $filename4 = "sempliciNonPresenti";
    $logFileName4 = $filename4 . '.log';
    try {
        $pCollection = Mage::getSingleton('index/indexer')->getProcessesCollection();
        foreach ($pCollection as $process) {
            $process->setMode(Mage_Index_Model_Process::MODE_MANUAL)->save();
        }
        $controllo = getAttributes($resource, $readConnection, $writeConnection, $username, $password, $service_url);
        if ($controllo == true) {
            $service_urlPost = $service_url . "/user/token";
            $curlPost = curl_init($service_urlPost);
            $headersPost = array('Content-Type:application/json;charset=utf-8', 'Content-Length: 0', 'Authorization: Basic ' . base64_encode($username . ":" . $password));
            curl_setopt($curlPost, CURLOPT_POST, true);
            // indico che la richiesta è di tipo POST
            curl_setopt($curlPost, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
            curl_setopt($curlPost, CURLOPT_SSL_VERIFYPEER, false);
            // disabilito la verifica del certificato SSL; è necessario perchè altrimenti non esegue la chiamata rest
            curl_setopt($curlPost, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($curlPost, CURLOPT_SSL_VERIFYHOST, false);
            curl_setopt($curlPost, CURLOPT_HTTPHEADER, $headersPost);
            $curl_responsePost = curl_exec($curlPost);
            if ($curl_responsePost === false) {
                $infoPost = curl_getinfo($curlPost);
/**
 * @author: coster
 * @date: 30.9.06
 * listet alle zimmer auf und erzeugt die tabellenzeilen 
 * */
function showAllRooms($month, $year, $unterkunft_id, $link, $saAktiviert, $sprache)
{
    $zimmerart = getUebersetzungUnterkunft(getZimmerart_EZ($unterkunft_id, $link), $sprache, $unterkunft_id, $link);
    $attResult = false;
    if (getPropertyValue(SHOW_ZIMMER_ATTRIBUTE_GESAMTUEBERSICHT, $unterkunft_id, $link) == "true") {
        $attResult = getAttributes();
    }
    ?>

	<table border="0" cellspacing="0" cellpadding="0" class="tableColor">
		<tr>
			<td></td>
			<?php 
    //ausgeben von leeren spalten wenn zusaetzlich attribute da sind:
    if ($attResult != false) {
        for ($i = 0; $i < mysqli_num_rows($attResult); $i++) {
            ?>
<td></td><?php 
        }
    }
    //ausgeben der tage in namen:
    $anzahlTageMo = getNumberOfDays($month, $year);
    for ($i = 1; $i <= $anzahlTageMo; $i++) {
        $tagName = getDayName($i, $month, $year);
        ?>
				<td align="center"><?php 
        echo getUebersetzung($tagName, $sprache, $link);
        ?>
</td>
			<?php 
    }
    ?>
		</tr>	
		<tr>
			<td><?php 
    echo $zimmerart;
    ?>
&nbsp;</td>
			<?php 
    //ausgeben der spaltenüberschriften wenn zusaetzlich attribute da sind:
    if ($attResult != false) {
        while ($d = mysqli_fetch_array($attResult)) {
            $bezeichnung = $d["Bezeichnung"];
            ?>
<td align="center"><?php 
            echo $bezeichnung;
            ?>
&nbsp;</td><?php 
        }
    }
    //ausgeben der tage in ziffern:
    $anzahlTageMo = getNumberOfDays($month, $year);
    for ($i = 1; $i <= $anzahlTageMo; $i++) {
        ?>
				<td align="center"><?php 
        echo $i;
        ?>
</td>
			<?php 
    }
    ?>
		</tr>
      <?php 
    $res = getZimmer($unterkunft_id, $link);
    while ($d = mysqli_fetch_array($res)) {
        $zimmer_id = $d["PK_ID"];
        $zimmer_value = $d["Zimmernr"];
        ?>
		  <tr> 
			<td align="center">
				<?php 
        echo getUebersetzungUnterkunft($zimmer_value, $sprache, $unterkunft_id, $link);
        ?>
			</td>
			<?php 
        //ausgeben der spaltenwerte wenn zusaetzlich attribute da sind:
        if ($attResult != false) {
            $attResult = getAttributes();
            while ($d = mysqli_fetch_array($attResult)) {
                $attribut_id = $d["PK_ID"];
                $wert = getAttributValue($attribut_id, $zimmer_id);
                ?>
<td align="center"><?php 
                echo $wert;
                ?>
</td><?php 
            }
        }
        for ($i = 1; $i <= $anzahlTageMo; $i++) {
            ?>
				<td width="20"
					<?php 
            $statusString = getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link);
            ?>
 
					class="<?php 
            echo $statusString;
            ?>
">
					<?php 
            printResAdmin($zimmer_id, $i, $month, $year, $saAktiviert, $link);
            ?>
				</td>
			<?php 
        }
        ?>
		  </tr>
	  <?php 
    }
    ?>
	</table>
	
<?php 
}
 *  All Rights Reserved.
 * 
 * NOTICE:  All information contained herein is, and remains the property of SocialApparatus 
 * and its suppliers, if any.  The intellectual  and technical concepts contained herein 
 * are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign 
 * Patents, patents in process, and are protected by trade secret or copyright law. 
 * 
 * Dissemination of this information or reproduction of this material is strictly forbidden 
 * unless prior written permission is obtained from SocialApparatus.
 * 
 * Contact Shane Barron admin@socia.us for more information.
 */
namespace SocialApparatus;

denyDirect();
$attributes = getAttributes("navbar");
if (!$attributes) {
    $attributes = "class='navbar navbar-default navbar-fixed-top' role='navigation'";
}
$logo = getSiteLogo();
echo display("navigation:before");
$scope = getScope();
if ($scope == "web") {
    ?>

    <nav <?php 
    echo $attributes;
    ?>
>
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
Пример #7
0
function xmlParse($data, $bList = "")
{
    $bArray = array();
    // if any attributes were passed to the function, add them to the array
    if (strlen($bList) > 0) {
        $bArray = explode(",", $bList);
    }
    // by: waldo@wh-e.com - trim space around tags not within
    $data = eregi_replace(">" . "[[:space:]]+" . "<", "><", $data);
    // XML functions
    $p = xml_parser_create();
    // by: anony@mous.com - meets XML 1.0 specification
    xml_parser_set_option($p, XML_OPTION_CASE_FOLDING, 0);
    xml_parse_into_struct($p, $data, $vals, $index);
    xml_parser_free($p);
    for ($x = 0; $x < count($vals); $x++) {
        if (array_key_exists("attributes", $vals[$x])) {
            foreach ($vals[$x]["attributes"] as $thiskey => $thisvalue) {
                // if the attribute name exists in the "bList" then re-cast the string to a boolean
                if (is_string($thisvalue) && array_search($thiskey, $bArray) !== false && (strtolower($thisvalue) == "true" || strtolower($thisvalue) == "false")) {
                    $vals[$x]["attributes"][$thiskey] = strtolower($thisvalue) == "true";
                }
            }
        }
    }
    $i = 0;
    $tree["xmlChildren"] = array();
    $tree["xmlChildren"][] = array('xmlName' => $vals[$i]['tag'], 'xmlAttributes' => getAttributes($vals, $i), 'xmlValue' => getValue($vals, $i), 'xmlChildren' => GetChildren($vals, $i));
    return $tree;
}
Пример #8
0
 protected function setInfoShopp()
 {
     include_once PLUGIN_PATH_SHIPWORKSWORDPRESS . 'functions/shopp/functionsShopp.php';
     if ($this->row['type'] == 'addon') {
         $this->itemID = getAddonSku($this->row);
         $this->productID = $this->row['product'];
         $this->code = getAddonSku($this->row);
         $this->sku = getAddonSku($this->row);
         $this->name = $this->row['name'];
         $this->quantity = $this->row['quantity'];
         $this->price = $this->row['price'];
         $this->unitprice = getAddonPrice($this->row);
         $this->weight = weightFilter(getAddonWeight($this->row));
         $this->unitcost = $this->row['cost'];
     } else {
         if (isVariation($this->row['price'])) {
             $this->itemID = getProductSku($this->row['price']);
             $this->productID = $this->row['price'];
             $this->code = getProductSku($this->row['price']);
             $this->sku = getProductSku($this->row['price']);
             $this->name = $this->row['name'];
             $this->quantity = $this->row['quantity'];
             $this->price = $this->row['price'];
             $this->unitprice = getProductPrice($this->row['price']);
             $this->weight = weightFilter(getWeight($this->price));
             $this->unitcost = $this->row['cost'];
             // On ajoute les attributs
             $attributes = getAttributes($this->row['price']);
             foreach ($attributes as $key => $attribute) {
                 array_push($this->attributes, new Attribute($this->software, $this->date, getAttributeParent($this->row['product'], trim($attribute)), $attribute));
             }
         } else {
             $this->itemID = getProductSku($this->row['price']);
             $this->productID = $this->row['price'];
             $this->code = getProductSku($this->row['price']);
             $this->sku = getProductSku($this->row['price']);
             $this->name = $this->row['name'];
             $this->quantity = $this->row['quantity'];
             $this->price = $this->row['price'];
             $this->unitcost = $this->row['cost'];
             $this->unitprice = getProductPrice($this->row['price']);
             $this->weight = weightFilter(getWeight($this->price));
         }
     }
 }
Пример #9
0
function createTableDefinition($superClass, $class)
{
    # Erzeuge Create Table Statement
    $sql = "CREATE TABLE IF NOT EXISTS " . strtolower($class['name']) . " (";
    if ($superClass == null) {
        $sql .= "\n  gml_id uuid NOT NULL DEFAULT uuid_generate_v5(uuid_ns_url(), 'http://xplan-raumordnung.org'),";
    }
    # lade Attribute
    $attributes = getAttributes($class);
    # für jedes Attribut erzeuge Attributzeilen
    foreach ($attributes as $i => $attribute) {
        $sql .= '
  ';
        $sql .= createAttributeDefinition($attribute);
    }
    $sql .= '
  CONSTRAINT ' . strtolower($class['name']) . '_pkey PRIMARY KEY (gml_id)
)';
    if ($superClass != null) {
        # leite von superClass ab
        $sql .= '
INHERITS (' . strtolower($superClass['name']) . ')';
    }
    $sql .= ';';
    # für jedes Attribut erzeuge Kommentar, wenn der type ein
    # Datentyp ist
    foreach ($attributes as $i => $attribute) {
        if ($attribute['classifier'] != '') {
            $sql .= createAttributeComment($class['name'], $attribute['name'], $attribute['classifier'], $attribute['classifier_stereotype']);
        }
    }
    $sql .= '

';
    output($sql);
    # lade abgeleitete Klassen
    $subClasses = getSubClasses($class);
    # Für alle abgeleiteten Klassen
    foreach ($subClasses as $subClass) {
        output('<br><b>SubKlasse: ' . $subClass['name'] . '</b> (' . $subClass['xmi_id'] . ')');
        $sql .= createTableDefinition($class, $subClass);
    }
    return $sql;
}
Пример #10
0
/**
 * This function creates the divisions needed for the courseReport page
 * 
 * @param type $courseid
 * @return type
 */
function coursereportpage($courseid)
{
    $subattributeslabel = get_string('sub-attributes-label', 'local_gas');
    $majornum = get_string('numOfMajor', 'local_gas');
    $minornum = get_string('numOfMinor', 'local_gas');
    $labels = getAttributes(current_language(), time());
    $students = studentsofcourse($courseid);
    $numofstudents = count($students);
    $numofstudentsdoneassessment = 0;
    $year = date("Y");
    $sem = semofdate(date("d"), date("m"));
    if (count($students) > 0) {
        foreach ($students as $studentid) {
            if (doneassessment($studentid, $sem, $year)) {
                $numofstudentsdoneassessment++;
            }
        }
    }
    $data = getreportdata($courseid);
    echo "\n        <div><br/>\n            <p>{$numofstudentsdoneassessment} out of {$numofstudents} students having this course have completed\n                their assessment of this semester.</p>\n            <table class='table table-bordered'>\n                <tr class='warning'>\n                    <td>{$subattributeslabel}\n                    </td>\n                    <td>{$majornum}\n                    </td>\n                    <td>{$minornum}\n                    </td>\n                </tr>\n                ";
    $class = ["success", "info"];
    $i = 0;
    foreach ($labels as $label) {
        $sublabels = getsubattributes($label->attribute_id, current_language(), time());
        foreach ($sublabels as $sublabel) {
            $r1 = getcontributedcourse($data, $students, $sublabel->subattribute_id, 3);
            $r2 = getcontributedcourse($data, $students, $sublabel->subattribute_id, 2);
            echo "<tr class='" . $class[$i % 2] . "'>\n                            <td>{$sublabel->name}\n                            </td>\n                            <td>{$r2}\n                            </td>\n                            <td>{$r1}\n                            </td>\n                        </tr>";
        }
        $i++;
    }
    echo "\n            </table>\n        </div>";
    return $data;
}
Пример #11
0
<?php

/* * ***********************************************************************
 * 
 * SocialApparatus CONFIDENTIAL
 * __________________
 * 
 *  [2002] - [2017] SocialApparatus (http://SocialApparatus.co) 
 *  All Rights Reserved.
 * 
 * NOTICE:  All information contained herein is, and remains the property of SocialApparatus 
 * and its suppliers, if any.  The intellectual  and technical concepts contained herein 
 * are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign 
 * Patents, patents in process, and are protected by trade secret or copyright law. 
 * 
 * Dissemination of this information or reproduction of this material is strictly forbidden 
 * unless prior written permission is obtained from SocialApparatus.
 * 
 * Contact Shane Barron admin@socia.us for more information.
 */
namespace SocialApparatus;

echo "<!DOCTYPE html>";
echo "<html lang = 'en'>";
echo "<head>";
echo display("page_elements/head");
echo "</head>";
echo "<body " . getAttributes("body") . ">";
echo Debug::displayDebugMessages();
echo display("header:after");
echo "<div id='preloader'></div>";
Пример #12
0
/**
 * JSON Form Element
 * Output a form in json
 * @package Foundation\form
 */
$f = $form;
$f->setId('id');
$form = array();
$form['attributes'] = getAttributes($f);
$form['fields'] = array();
foreach ($f->getFields() as $fl) {
    $field = array('legend' => $fl->getLegend(), 'instructions' => $fl->getInstructions(), 'attributes' => getAttributes($fl), 'elements' => array());
    foreach ($fl->getElements() as $e) {
        $e->preRender();
        $element = $e->toArray();
        $element['attributes'] = getAttributes($e);
        $element['messages'] = array();
        $element['views'] = array();
        foreach ($e->getMessages() as $message) {
            $element['messages'][] = $message;
        }
        $name = get_class($e);
        do {
            $noNameSpaceName = explode('\\', $name);
            $noNameSpaceName = $noNameSpaceName[count($noNameSpaceName) - 1];
            $element['views'][] = $noNameSpaceName;
        } while ($name = get_parent_class($name));
        $field['elements'][] = $element;
    }
    $form['fields'][] = $field;
}
Пример #13
0
<?
Пример #14
0
function spi_sessionhandling_setResponse($token)
{
    $session = AuthMemCookie_getSession(TRUE);
    $session['SamlResponse'] = $token->saveXML();
    /* Store attributes in the session for easy access through Auth MemCookie. */
    $attributes = getAttributes($token);
    foreach ($attributes as $key => $a) {
        $session[$key] = $a;
    }
    AuthMemCookie_saveSession($session);
}
Пример #15
0
		<p>Session:</p><pre>
			<?php 
    /*
    ob_start();
    print_r($_SESSION);
    $debugsession = ob_get_flush();
    			
    print(htmlentities($debugsession)); 
    */
    //print_r($_SESSION);
    ?>
</pre>
		
	<p>Attributes:</p><pre><?php 
    $token = spi_sessionhandling_getResponse();
    $attributes = getAttributes($token);
    // If attributes are base64 encoded. Some setups use base64 encoding of attributes, becasue of the UTF-8 bug in
    // Sun Access Manager, Federation Manager and OpenSSO.
    //
    // 		foreach ($attributes AS $key => $a) {
    // 			$attributes[$key] = base64_decode($a);
    // 		}
    print_r($attributes);
    ?>
</pre>
	<?php 
} else {
    ?>
		<p><a href="<?php 
    echo htmlspecialchars($ssoinit_url);
    ?>