예제 #1
0
 public function main($opt = array())
 {
     $structure = get_structure('backend/menu');
     $page = array();
     $page['content'] = $this->widget('menu/block', $structure['types'], TRUE);
     $this->view('backend/backend', $page);
 }
예제 #2
0
 public function contacts()
 {
     Builder::set_title(get_string('pages', 'feedback'));
     Builder::add_meta('robots', 'none', TRUE);
     Builder::add_js('system/wx');
     Builder::add_css('pages/frontend-contacts');
     Builder::add_css('pages/support');
     Builder::add_constant(array('COMMAND' => 'home', 'ACTION' => 'set_contact'));
     //--------------Contents-----------------
     $contents = get_structure('frontend/contact');
     $contents = $this->view('contacts', $contents, TRUE);
     $nav = array();
     $nav[get_string('url_naming', 'home')] = '';
     $nav[get_string('url_naming', 'contacts')] = 'special/contact';
     //------------------Total page------------
     $page = array();
     $page['nav'] =& $nav;
     $page['content'] = $contents;
     $this->view('frontend/frontend', $page);
 }
예제 #3
0
<header class="main-header">
    <menu class="main-header-menu">
        <?php 
$menu = get_structure('frontend/main-menu');
$controller = Buffer::get(URL_CONTROLLER);
$method = Buffer::get(URL_METHOD);
if ($method == 'about') {
    $controller = $method;
}
$isSelected = FALSE;
foreach ($menu as $name => $link) {
    $class = 'main-header-menu-item';
    if (!$isSelected and (strpos($link, $controller) or $method == 'index')) {
        $isSelected = TRUE;
        $class = 'main-header-menu-item-selected';
    }
    echo "<a class=\"{$class}\" href=\"{$link}\">{$name}</a>";
}
?>
    </menu>
    <div class="main-header-line"></div>
    <div class="main-header-green">
        <div class="main-header-state">
            <?php 
$this->widget('menu/path_dispatcher', isset($nav) ? $nav : array());
?>
        </div>
    </div>
    <div class="main-header-logo">
        <h1><?php 
echo get_string('pages', 'logo');
예제 #4
0
function display_edit_form($objid, $object_general, $object_rights, $object_lifecycle, $object_tech)
{
    echo $object_general['title'];
    ?>
  <form method="post" action="edit_this_metadata.php">
  <table>
    <tr>
      <td>Hidden:</td>
      <td><input type="hidden" name="objid" value="<?php 
    echo $objid;
    ?>
" /></td></tr>
    <tr>
      <td>Title:</td>
      <td><input type="text" name="newtitle" value="<?php 
    echo $object_general['title'];
    ?>
" /></td></tr>
    <tr>
      <td>Author:</td>
      <td><input type="text" name="newauthor" value="<?php 
    echo $object_general['author'];
    ?>
"/></td></tr>
     <tr>
              <td>Discipline</td>
              <td valign="top">
                <select name="newdiscipline" size="1">
                  <?php 
    $disc_array = get_discipline();
    foreach ($disc_array as $thisdisc) {
        echo "<option value=\"" . $thisdisc['discname'] . "\"";
        if ($thisdisc['discname'] == $object_general['discipline']) {
            echo "selected";
        }
        echo ">" . $thisdisc['discname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
         <tr>
              <td>Language</td>
              <td valign="top">
                <select name="newlanguage" size="1">
                  <?php 
    $lang_array = get_language();
    foreach ($lang_array as $thislang) {
        echo "<option value=\"" . $thislang['langname'] . "\"";
        if ($thislang['langname'] == $object_general['language']) {
            echo "selected";
        }
        echo ">" . $thislang['langname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
    <tr>
      <td>Keyword:</td>
      <td><input type="text" name="newkeyword" value="<?php 
    echo $object_general['keyword'];
    ?>
" /></td></tr> 
    <tr>
              <td>Structure</td>
              <td valign="top">
                <select name="newstructure" size="1">
                  <?php 
    $struct_array = get_structure();
    foreach ($struct_array as $thisstruct) {
        echo "<option value=\"" . $thisstruct['structname'] . "\"";
        if ($thisstruct['structname'] == $object_general['structure']) {
            echo "selected";
        }
        echo ">" . $thisstruct['structname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
     <tr>
              <td>Aggregation Level</td>
              <td valign="top">
                <select name="newaggrelvl" size="1">
                  <?php 
    $aggrelvl_array = get_aggrelvl();
    foreach ($aggrelvl_array as $thisaggrelvl) {
        echo "<option value=\"" . $thisaggrelvl['aggrelvlname'] . "\"";
        if ($thisaggrelvl['aggrelvlname'] == $object_general['aggregation_level']) {
            echo "selected";
        }
        echo ">" . $thisaggrelvl['aggrelvlname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
    <tr>
      <td>Version:</td>
      <td><input type="text" name="newversion" value="<?php 
    echo $object_lifecycle['version'];
    ?>
" /></td></tr>
     <tr>
              <td>Status</td>
              <td valign="top">
                <select name="newstatus" size="1">
                  <?php 
    $status_array = get_status();
    foreach ($status_array as $thisstatus) {
        echo "<option value=\"" . $thisstatus['statusname'] . "\"";
        if ($thisstatus['statusname'] == $object_lifecycle['status']) {
            echo "selected";
        }
        echo ">" . $thisstatus['statusname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr> 
    <tr>
              <td>Interactivity Type</td>
              <td valign="top">
                <select name="newinteracttype" size="1">
                  <?php 
    $intertype_array = get_intertype();
    foreach ($intertype_array as $thisintertype) {
        echo "<option value=\"" . $thisintertype['intertypename'] . "\"";
        if ($thisintertype['intertypename'] == $object_general['interactivity_type']) {
            echo "selected";
        }
        echo ">" . $thisintertype['intertypename'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>            
    <tr>
              <td>Learning Resource Type</td>
              <td valign="top">
                <select name="newresourcetype" size="1">
                  <?php 
    $resourcetype_array = get_resourcetype();
    foreach ($resourcetype_array as $thisresourcetype) {
        echo "<option value=\"" . $thisresourcetype['resourcetypename'] . "\"";
        if ($thisresourcetype['resourcetypename'] == $object_general['learning_res_type']) {
            echo "selected";
        }
        echo ">" . $thisresourcetype['resourcetypename'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>    
   <tr>
              <td>Interactivity Level</td>
              <td valign="top">
                <select name="newinteractlvl" size="1">
                  <?php 
    $interactlvl_array = get_interactlvl();
    foreach ($interactlvl_array as $thisinteractlvl) {
        echo "<option value=\"" . $thisinteractlvl['interactlvlname'] . "\"";
        if ($thisinteractlvl['interactlvlname'] == $object_general['interactivity_level']) {
            echo "selected";
        }
        echo ">" . $thisinteractlvl['interactlvlname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>    
   <tr>
              <td>Intended End User Role</td>
              <td valign="top">
                <select name="newenduserrole" size="1">
                  <?php 
    $enduserrole_array = get_enduserrole();
    foreach ($enduserrole_array as $thisenduserrole) {
        echo "<option value=\"" . $thisenduserrole['enduserrolename'] . "\"";
        if ($thisenduserrole['enduserrolename'] == $object_general['intended_end_user_role']) {
            echo "selected";
        }
        echo ">" . $thisenduserrole['enduserrolename'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
   <tr>
      <td>Typical Learning Time:</td>
      <td><input type="text" name="newlearningtime" value="<?php 
    echo $object_general['typical_learning_time'];
    ?>
" /></td></tr>        
   <tr>
              <td>Cost</td>
              <td valign="top">
                <select name="newcost" size="1">
                  <?php 
    $cost_array = get_cost();
    foreach ($cost_array as $thiscost) {
        echo "<option value=\"" . $thiscost['costname'] . "\"";
        if ($thiscost['costname'] == $object_rights['cost']) {
            echo "selected";
        }
        echo ">" . $thiscost['costname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>  
   <tr>
              <td>Copyrights and Other Restrictions</td>
              <td valign="top">
                <select name="newcopyright" size="1">
                  <?php 
    $copyright_array = get_copyright();
    foreach ($copyright_array as $thiscopyright) {
        echo "<option value=\"" . $thiscopyright['copyrightname'] . "\"";
        if ($thiscopyright['copyrightname'] == $object_rights['copyrights_and_other_res']) {
            echo "selected";
        }
        echo ">" . $thiscopyright['copyrightname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr> 
                                             
   </table>
   <div class="page-header">
   <p></p>
   </div>
   <button class="btn btn-primary" type="submit">Update Object</button>
   </form>
   
   
 <?php 
}
예제 #5
0
<?php

$debug = 1;
require_once "../../../JPFLibs.php";
libadd("lib.JPF.Data.MySQL");
$myFile = GlobalVars::$DRIVEPATH . GlobalVars::$DATAPATH . "/DB.SQL";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = get_structure();
fwrite($fh, $stringData);
header("Location: Generator.php");
function get_structure()
{
    $tables = mysql_list_tables(SQL_Connector::getDBName());
    $SQL = array();
    while ($td = mysql_fetch_array($tables)) {
        if (substr($td[0], 0, 2) != "mw") {
            $table = $td[0];
            $r = mysql_query("SHOW CREATE TABLE `{$table}`");
            if ($r) {
                $insert_sql = "";
                $d = mysql_fetch_array($r);
                $d[1] .= ";";
                $SQL[] = str_replace("CREATE TABLE", "create table", $d[1]);
                $table_query = mysql_query("SELECT * FROM `{$table}`");
                $num_fields = mysql_num_fields($table_query);
                //
                //
                //
                //        while ($fetch_row = mysql_fetch_array($table_query))
                //        {
                //        $insert_sql .= "INSERT INTO $table VALUES(";