Ejemplo n.º 1
0
function format_names_html($names)
{
    foreach ($names as $k => $name) {
        $names[$k] = latex2html($name);
    }
    return format_names($names);
}
Ejemplo n.º 2
0
        echo '<li class="active">Edit Record (' . ucfirst($this->vars[3]) . ')</li>';
        break;
        //case edit ends
    //case edit ends
    case 'tableicons':
        echo '<li class="active">Module Icons</li>';
        break;
        //case edit ends
    //case edit ends
    case 'search':
        echo '<li class="active">Search Results in "' . ucfirst(format_names($this->vars[2])) . '"</li>';
        break;
        //case search ends
    //case search ends
    case 'detail':
        echo '<li><a href="' . main_url . '/adminarea/table/' . $this->vars[2] . '">Manage Table (' . ucfirst(format_names($this->vars[2])) . ')</a></li>';
        echo '<li class="active">Record Details (' . ucfirst($this->vars[3]) . ')</li>';
        break;
        //case detail ends
    //case detail ends
    case 'backup_restore':
        echo '<li class="active">Backup &amp; Restore</li>';
        //case backup_restore ends
    //case backup_restore ends
    case 'alias_management':
        echo '<li class="active">Alias Management</li>';
        //case alias_management ends
}
//switch ends
?>
      </ol>
Ejemplo n.º 3
0
    } else {
        $hidden_fields = $this->hidden_fields;
    }
    if ($field == $this->tb_primaryid) {
    } elseif (in_array($field, $hidden_fields)) {
    } else {
        ?>
      <div class="form-group" id="group_<?php 
        echo $value['Field'];
        ?>
">
        <label for="input_<?php 
        echo $value['Field'];
        ?>
" class="col-lg-2 control-label"><?php 
        echo format_names($value['Field']);
        ?>
</label>
        <div class="col-lg-10">
          <?php 
        if ($field_type == 'int' || $field_type == "varchar" || $field_type == "bigint") {
            ?>
            <?php 
            //pr($this->get_another_data);
            if (in_array($value['Field'], $keys)) {
                $multiple_true = "";
                $array_true = "";
                if (in_array($value['Field'], $rel_main_fields_array)) {
                    $multiple_true = "multiple";
                    $array_true = "[]";
                }
Ejemplo n.º 4
0
<?php

echo $this->render("themes/adminarea/html/elements/header.php");
?>

<div class="row">
  <div class="col-lg-12">
	  
  <h1><strong>Download CSV:</strong> <em><?php 
echo format_names($this->vars[2]);
?>
</em> </h1>
<hr />
  
  
  </div>
</div>

<?php 
echo $this->render("themes/adminarea/html/elements/footer.php");
?>
 
Ejemplo n.º 5
0
    }
}
//Get Records
if ($perpage == "all") {
    $get_records = $database->select($table_name, $column_names, array("ORDER" => $sortby_field . " " . $sortby_method));
} else {
    $get_records = $database->select($table_name, $column_names, array("LIMIT" => array($next_number, $perpage), "ORDER" => $sortby_field . " " . $sortby_method));
}
$count_records = $database->count($table_name);
//Count Records
if ($perpage == "all") {
    $total_pages = 1;
    // Total Pages
} else {
    $total_pages = ceil($count_records / $perpage);
    // Total Pages
}
$token = NoCSRF::generate('csrf_token');
$tpl->formtoken = $token;
$tpl->currentpage = $page_no;
$tpl->total_pages = $total_pages;
$tpl->total_records = $count_records;
$tpl->table = $table_name;
$tpl->records = $get_records;
$tpl->perpage = $perpage;
$tpl->table_headers = $column_names;
$tpl->current_order = $sortby_method;
$tpl->custom_data = $custom_data;
$tpl->tb_primaryid = $database->getPKID($table_name);
$tpl->page_title = format_names($table_name);
echo $tpl->render("themes/adminarea/html/table.php");
Ejemplo n.º 6
0
          
          
          <div class="tab-pane fade" id="mailsettings">
            <p></p>
            <div class="panel panel-default">
              <div class="panel-heading">
                <h3 class="panel-title">Social Settings</h3>
              </div>
              <div class="panel-body">
                <div class="col-lg-7">
                  <?php 
foreach ($this->setting_array['mail'] as $key => $value) {
    ?>
                  <div class="form-group">
                    <label for="inputEmail1" class="col-lg-3 control-label"><?php 
    echo format_names($value['setting_name']);
    ?>
</label>
                    <div class="col-lg-9">
                      <input type="text" name="data[<?php 
    echo $value['setting_name'];
    ?>
]" class="form-control" id="<?php 
    echo $value['setting_name'];
    ?>
" placeholder=""  value="<?php 
    echo $value['setting_value'];
    ?>
">
                    </div>
                  </div>
Ejemplo n.º 7
0
                </center></th>
                        <?php 
    foreach ($this->table_headers as $header) {
        ?>
                    <th><a href="javascript:void(0);" class="sortbyASC" fieldname="<?php 
        echo $header;
        ?>
" method="<?php 
        if ($this->current_order == "ASC") {
            echo "DESC";
        } else {
            echo "ASC";
        }
        ?>
"><?php 
        echo format_names($header);
        ?>
                    <?php 
        if ($this->current_order == "ASC") {
            ?>
                                <i class="icon-sort-by-attributes"></i>
                    <?php 
        } else {
            ?>
                                <i class="icon-sort-by-attributes-alt"></i>
        <?php 
        }
        ?>
                        </a>
                    </th>
                    <?php 
Ejemplo n.º 8
0
        if (!in_array($table, $this->skipped_tables)) {
            $iconclass = $table_icons[$table];
            ?>
        <div class="panel panel-default sidebartables">
          <div class="panel-heading">
            <h4 class="panel-title"> <a class="accordion-toggle" table="<?php 
            echo $table;
            ?>
" data-toggle="collapse" data-parent="#accordion" href="#collap_<?php 
            echo $table;
            ?>
"><i class="<?php 
            echo $iconclass;
            ?>
"></i> &nbsp;<?php 
            echo format_names($table);
            ?>
 </a> </h4>
          </div>
          <div id="collap_<?php 
            echo $table;
            ?>
" class="panel-collapse collapse <?php 
            if (isset($this->vars[2]) && $this->vars[2] == $table) {
                echo "in";
            }
            ?>
">
            <div class="panel-body" style="padding:0px;">
              <ul class="nav nav-pills nav-stacked">
                <li class="<?php 
Ejemplo n.º 9
0
    exit;
}
echo "New blocks : " . ($getinfo['blocks'] - $getinfo_old['blocks']) . "\n";
showDebug(0);
//
$diff = $getinfo['blocks'] - $getinfo_old['blocks'];
$new_names = $rpc->name_filter("^d/[a-z0-9_-]+\$", $diff);
#echo '<pre>'; print_r($new_names);
if (!count($new_names)) {
    echo 'No new name since last scan';
    exit;
}
showDebug(1);
// there are new names
echo "New names : " . count($new_names) . "\n";
format_names($new_names, $getinfo['blocks']);
#echo '<pre>'; print_r($new_names);
set_cache('getinfo', $getinfo);
// get list of names block
if (!($names_block = get_cache('names_block'))) {
    $names_block = array();
}
if (!($bind_tree = get_cache('bind_tree'))) {
    $bind_tree = array();
}
// remove expired names
foreach ($names_block as $name => $block) {
    if ($block < $getinfo['blocks']) {
        if (isset($showDebug) && $showDebug) {
            echo 'Expired : ' . $name . ' (' . $block . ')' . "\n";
        }
Ejemplo n.º 10
0
                        $ids = unserialize($_POST['data'][$relation['main_field']]);
                        foreach ($ids as $multiple_id) {
                            $database->insert($relation['main_table'] . "_" . $relation['secondary_table'], array($relation['main_table'] . '_id' => $last_user_id, $relation['secondary_table'] . '_id' => $multiple_id));
                        }
                    }
                }
                header("Location: " . _admin_url . "/edit/" . $table_name . "/rec:" . $last_user_id . "/saved");
                exit;
            }
        }
    } catch (Exception $e) {
        // CSRF attack detected
        $result = $e->getMessage() . ' Form ignored.';
        header("Location: " . main_url . "/adminarea/add/" . $table_name . "/error/" . $result);
    }
} else {
    $result = 'No post data yet.';
}
if (isset($error_message)) {
    $tpl->error_message = $error_message;
}
$getcolumns = $database->getColumns($table_name);
$token = NoCSRF::generate('csrf_token');
$tpl->formtoken = $token;
$tpl->result = $result;
$tpl->page_title = "Add a Record : " . format_names($table_name);
$tpl->table = $table_name;
$tpl->tb_primaryid = $database->getPKID($table_name);
$tpl->columns = $getcolumns;
$tpl->custom_data = $custom_data;
echo $tpl->render("themes/adminarea/html/add.php");
Ejemplo n.º 11
0
                $value .= '<a class="list-group-item" href="' . _admin_url . "/detail/" . $this->custom_data[$key]['attributes']['secondary_table'] . '/rec:' . $val_option[$this->custom_data[$key]['attributes']['value']] . '">' . $val_option[$this->custom_data[$key]['attributes']['seconday_field']] . '</a>';
            }
        }
        $value .= "</div>";
    } elseif (in_array($key, $rel_simple_fields_array)) {
        foreach ($this->custom_data[$key]['data'] as $key_option => $val_option) {
            if ($val_option[$this->custom_data[$key]['attributes']['value']] == $content[$key]) {
                $value = '<a href="' . _admin_url . "/detail/" . $this->custom_data[$key]['attributes']['secondary_table'] . '/rec:' . $val_option[$this->custom_data[$key]['attributes']['value']] . '">' . $val_option[$this->custom_data[$key]['attributes']['seconday_field']] . '</a>';
            }
        }
    }
    ?>


<tr><td width='180'><strong><?php 
    echo format_names($key);
    ?>
</strong></td><td style='word-wrap: break-word'><?php 
    echo $value;
    ?>
</td></tr>


<?php 
}
?>
</table>
</div>


Ejemplo n.º 12
0
    echo $current_page + ($current_page % 2 == 0 ? 3 : 2);
    ?>
}
  \tocAuthors{<?php 
    echo format_names($workshop['editors']);
    ?>
}
<?php 
    $current_page += ($current_page % 2 == 0 ? 1 : 0) + pdf_length('workshops/' . $workshop['shortname'] . '/frontmatter/preface-stamped.pdf');
    foreach ($workshop['papers'] as $paper) {
        ?>
  \tocTitle{<?php 
        echo $paper['title'];
        ?>
}{<?php 
        echo $current_page;
        ?>
}
  \tocAuthors{<?php 
        echo format_names($paper['authors']);
        ?>
}
<?php 
        $current_paper++;
        $current_page += $paper['length'];
    }
}
?>

\end{document}
Ejemplo n.º 13
0
                    <table align="center" class="table table-hover">
                        <thead>
                            <tr id="save-row" hidden>
                                <th colspan="3"><input class="btn btn-success btn-bar btn-block" style="font-size:16px" type="submit" value="SAVE ALL CHANGES" /></th>
                            </tr>
                            <tr>
                                <th>S.No</th>
                                <th>Table Name</th>
                                <th>ICON</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php 
$i = 1;
foreach ($this->table_icons as $table_name => $icon) {
    $tbl_name = format_names($table_name);
    ?>
                                <tr class="" id="clicked-row" style="cursor:pointer">
                                    <td>
                                        <input type="hidden" id="table-name" value="<?php 
    echo $table_name;
    ?>
" />
                                        <input type="hidden" id="<?php 
    echo $table_name;
    ?>
" name="table[<?php 
    echo $table_name;
    ?>
]" value="<?php 
    echo $icon;