function xsl()
 {
     $this->data['title'] = 'Trends XSL';
     $this->data['pagebody'] = 'vtrendsxsl';
     //obtains view template data
     $this->load->helper('display');
     //loads the helper functionality
     $this->data['myxml'] = display_file('./data/xml/energy.xml');
     //displays the contents of the xml file in the myxml placeholder
     $this->data['xmltable'] = xsl_transform('./data/xml/energy.xml', './data/xml/energy.xsl');
     $this->data['eproduced'] = xsl_transform('./data/xml/energy.xml', './data/xml/energy2.xsl');
     $this->data['eused'] = xsl_transform('./data/xml/energy.xml', './data/xml/energy3.xsl');
     $doc = new DOMDocument();
     //$doc->validateOnParse = true;
     $doc->load('./data/xml/energy.xml');
     $xml = XMLReader::open('./data/xml/energy.xml');
     $xml->setSchema('./data/xml/energy.xsd');
     // You must to use it
     $xml->setParserProperty(XMLReader::VALIDATE, true);
     libxml_use_internal_errors(true);
     if ($xml->isValid()) {
         $this->data['validatedxml'] = '<br/>XML Valid <br/><br/>';
     } else {
         $result = "<b>ERROR</b><br/>";
         foreach (libxml_get_errors() as $error) {
             $result .= $error->message . '<br/>';
         }
         libxml_clear_errors();
         $result .= '<br/>';
         $this->data['validatedxml'] = $result;
     }
     $this->render();
     //renders the page
 }
示例#2
0
文件: lab03.php 项目: badukboy/BCIT
 /**
  * Default entry point.
  */
 function index()
 {
     $this->load->helper('display');
     $this->data['myxml'] = display_file('./data/populations.xml');
     $this->data['timestamp'] = '23.01.2013';
     $this->data['heading'] = 'LAB 3';
     $this->data['subheading'] = 'XML';
     $this->data['pagetitle'] = 'Kevin Csapko - Lab 3';
     $this->data['pagebody'] = 'lab03';
     $this->render();
 }
示例#3
0
文件: lab04.php 项目: badukboy/BCIT
 /**
  * Default entry point.
  */
 function index()
 {
     // Load helpers
     $this->load->helper('display');
     $this->load->helper('common');
     // XML validation and display
     $this->data['validation'] = validate_xml('./data/populations_v2.xml');
     $this->data['myxml'] = display_file('./data/populations_v2.xml');
     $this->data['mydtd'] = display_file('./data/populations_v2.dtd');
     // General placeholders
     $this->data['timestamp'] = '29.01.2013';
     $this->data['heading'] = 'LAB 4';
     $this->data['subheading'] = 'DTD';
     $this->data['pagetitle'] = 'Kevin Csapko - Lab 4';
     $this->data['pagebody'] = 'lab04';
     $this->render();
 }
示例#4
0
文件: lab05.php 项目: badukboy/BCIT
 /**
  * Default entry point.
  */
 function index()
 {
     // Load helpers
     $this->load->helper('display');
     $this->load->helper('common');
     // XML validation and display
     $this->data['validation'] = validate_xml_schema('./data/populations_v3.xml', './data/populations_v3.xsd');
     $this->data['myxml'] = display_file('./data/populations_v3.xml');
     $this->data['myschema'] = display_file('./data/populations_v3.xsd');
     // General placeholders
     $this->data['timestamp'] = '05.02.2013';
     $this->data['heading'] = 'LAB 5';
     $this->data['subheading'] = 'Schema';
     $this->data['pagetitle'] = 'Kevin Csapko - Lab 5';
     $this->data['pagebody'] = 'lab05';
     $this->render();
 }
示例#5
0
<?php

/**
 * phpMyAdmin ShapeFile library
 * <https://github.com/phpmyadmin/shapefile/>
 *
 * Copyright 2006-2007 Ovidio <ovidio AT users.sourceforge.net>
 * Copyright 2016 Michal Čihař <*****@*****.**>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you can download one from
 * https://www.gnu.org/copyleft/gpl.html.
 */
require_once '../vendor/autoload.php';
require_once './read.php';
display_file('../data/capitals.*');
示例#6
0
function display_columns_list($all_columns, $data)
{
    //text,file,按照通栏的来,别的走一半
    $full_li_class_types = array('text', 'split', 'group');
    $str = '';
    foreach ($all_columns as $name => $v) {
        $liclass = '';
        if (in_array($v['type'], $full_li_class_types)) {
            $liclass = 'clear full';
        }
        if (isset($v['hidden']) && ($v['hidden'] == 'detail' || $v['hidden'] == 'both' || $v['hidden'] == '1')) {
            $liclass .= ' hidden';
        }
        $str .= "<li class='column_display_li {$liclass}'>";
        if (!$v['type'] || $v['type'] == 'string' || $v['type'] == 'number' || $v['type'] == 'select' || $v['type'] == 'text' || $v['type'] == 'date') {
            $str .= display_text($v['display_name'], $name, $data[$name], $v['options'], $v['class'], $v['link'], $data, $all_columns, $liclass, $v['length'], $v['extra_type']);
        } else {
            if ($v['type'] == 'split') {
                $str .= display_split($v['display_name']);
            } else {
                if ($v['type'] == 'file') {
                    $str .= display_file($v['display_name'], $name, $data[$name], $v['param'], $v['class'], $v['link'], $data, $all_columns);
                } else {
                    if ($v['type'] == 'group') {
                        $str .= '<span class="column_title">' . $v['display_name'] . '</span><div class="span11 column_content">';
                        $str .= display_group($data[$name], $v['param']['options']);
                        $str .= '</div></li>';
                    }
                }
            }
        }
        $str .= '</li>';
    }
    return $str;
}
示例#7
0
				thumb($photo['fullpath'],$cachefile,$width,$output);
			}
		} elseif (filesize($cachefile) == 0 || (filemtime($cachefile) < strtotime($photo['updated']))) {
			unlink($cachefile);
			if ($photo['type'] == "ai") {
				copy($photo['fullpath'],$cache."/".$photo['id'].".pdf");
				thumb($cache."/".$photo['id'].".pdf",$cachefile,$width,$output);
			} else {
				thumb($photo['fullpath'],$cachefile,$width,$output);
			}
		}
		
		if ($action == "download") {
			download_file($photo['file'], $cachefile);
		} else {
			display_file($cachefile);
		}
		
	}

	function download_file($filename, $filesource, $mimetype = false) {
		global $debug;
		$f_info = pathinfo($filename);
		$s_info = pathinfo($filesource);
		$f_ext = trim(strtolower($f_info['extension']));
		$s_ext = trim(strtolower($s_info['extension']));
		if ($f_ext !== $s_ext) { $filename = $f_info['filename'].".".$s_ext; }
		if (!$mimetype) {
			$mimetype = ext_from_mimetype($s_ext, true);
			if (empty($mimetype)) {
				$isize = imgetimagesize($filesource);
示例#8
0
<?php

/**
 * phpMyAdmin ShapeFile library
 * <https://github.com/phpmyadmin/shapefile/>
 *
 * Copyright 2006-2007 Ovidio <ovidio AT users.sourceforge.net>
 * Copyright 2016 Michal Čihař <*****@*****.**>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you can download one from
 * https://www.gnu.org/copyleft/gpl.html.
 */
require_once '../vendor/autoload.php';
require_once './read.php';
display_file('../data/mexico.*');
示例#9
0
                }
                echo "<span class = 'menu'>\n        <a class = 'hover-link' style=\"background-color: #ffffcc\">{$tt}&nbsp</a>\n        <div class='sub'>\n          <ul class='sub-options'>";
                echo "<li><a href='#'> <span style = \"color:blue\">" . $word . "&nbsp</span> </a></li>";
                echo "<li><a href='#'> <span>" . $tt . "&nbsp</span>" . round($tt1 / $NORMALIZE_NUM, 4) . "</a></li>";
                while ($row = mysql_fetch_assoc($result)) {
                    $new_row = mysql_fetch_assoc($new_result);
                    echo "<li><a href='#'><span>" . $row['center'] . "&nbsp</span> " . round($row['distance'] / $NORMALIZE_NUM, 2) . "&nbsp&nbsp&nbsp&nbsp&nbsp<span>" . $new_row['neighbors'] . "&nbsp</span>" . round($new_row['distance'] / $NORMALIZE_NUM, 2) . " </a></li>";
                }
                echo "\n          </ul>\n        </div>\n        </span>";
            }
        }
    }
}
$dir = $_GET['name'];
$PARA_NUM = $_GET['num'];
display_file($dir, $PARA_NUM);
?>

    </div>
     <div id="right">
      <?php 
display_file_right($dir, $PARA_NUM);
?>
    </div> 
    <div class="clear"></div>
  </div>
  <script type="text/javascript">
    // toggle
    $(".menu").hover(
            function () {
                $(this).find('.sub').slideToggle(400);
示例#10
0
        echo "<br />";
        foreach ($word_array as $word) {
            // if(count($word) > 0 and (ord($word[0]) < 'a' or ord( $word[0]) > ord('z') ) )
            // 	$SQL = "SELECT center FROM dict_table WHERE plain = ".'\''. $word. '\'';
            // elseif(count($word) > 0)
            // 	$SQL = "SELECT center FROM dict_". $word[0] ." WHERE plain = ".'\''. $word. '\'';
            // else
            // 	continue;
            $SQL = "SELECT center FROM dict_table USE INDEX (search_index) WHERE plain = " . '\'' . $word . '\'';
            $result = mysql_query($SQL, $db_handle);
            $n = mysql_num_rows($result);
            $tt = array();
            while ($row = mysql_fetch_assoc($result)) {
                $tt = $row['center'];
            }
            if ($n == 0) {
                echo "<span><span class= 'oneword' onclick='myclick(this)' id ='{$n}'>{$word} </span><span class= 'oneword2' onclick='myclick(this)'>{$word}</span> \n\t\t\t\t</span>";
            } else {
                echo "<span><span class= 'oneword' onclick='myclick(this)'>{$tt} </span><span class= 'oneword2' onclick='myclick(this)'>{$word}</span> \n\t\t\t\t</span>";
            }
        }
    }
    echo "</table>";
}
$dir = $_GET['name'];
display_file($dir);
?>


</body>
</html>