function makeInputQuery($db)
{
    $html = "";
    $vals = explode(',', $_GET['valuesSet']);
    foreach ($vals as $value) {
        if ($value == "null") {
            $newvals[] = $value;
        } elseif (is_numeric($value)) {
            $newvals[] = $value;
        } else {
            $newvals[] = "'" . $value . "'";
        }
    }
    $temp = $db->insert($_GET['tableName'], implode(",", $newvals));
    if ($temp != '') {
        echo $temp;
    } else {
        "<p style='color:blue;'>" . 'Новое значение добавлено!' . "</p>";
    }
    /*ГОВНОКОД*/
    require_once "show_links.php";
    show_links();
}
Exemple #2
0
function show_footer($is_logged_in, $is_admin, $is_verified)
{
    if (isset($_GET['fancy'])) {
        echo "</div></body></html>\n";
        return;
    }
    ?>
                </div>
            </div>
        </div>
    </div>
    <div id='links'>
        <ul>
<?php 
    show_links($is_logged_in, $is_admin, $is_verified);
    ?>
        </ul>
    </div>
    <!--<div id='languages'>
        <a href='google.com'>en</a> &#183; <a href='eo.google.com'>eo</a> &#183; <a href='fff'>fr</a>
    </div>-->
</body>
</html>
<?php 
}
Exemple #3
0
function show_sidebar()
{
    show_links('sidebar');
}
Exemple #4
0
?>
        </ul>
		  <?php 
show_content_area('Below Navigation');
?>
	  </div>
    </div>
    <div id="right">
	  <?php 
show_content_slug();
?>
    </div>
 </div>

<div class="break">&nbsp;</div>
 <div id="footer">
 	<div style="float:right"><?php 
show_links('Footer-Right', ' | %s');
?>
</div>
	<?php 
show_content_area('Copyright Notice');
?>
	powered by <a href='http://NanoCMS.in'>NanoCMS</a>
 </div>
</div>
<?php 
runTweak('end-body');
?>
</body>
</html>
         clearMediaCache($back);
         if ($clear == "1" && $qcache == "1") {
             $mysql_cachereset = $db_con->query("RESET QUERY CACHE");
             echo "<div>&nbsp;</div>\n                            <p class='cntr em sml'>MySQL query cache cleared.</p>\n                        ";
         }
     }
     echo "<br />\n                    <p class='cntr em'>MySQL database and thumbnails folder cleared.</p>\n                    ";
     if ($real_log == '0') {
         echo "\n                        <br /><br />\n                        <p class='cntr em'><a href='spider.php?all=3' title='Reindex now'>Okay, now re-index all</a></p>\n                        <br />\n                        <p class='cntr em'><a class='bkbtn' href='admin.php' title='Back to admin'>Return to admin without reindex</a>\n                        <br /><br />\n                        </p>\n                    ";
     } else {
         echo "\n                        <br /><br /><br />\n                        <form action='spider.php' method='get'>\n                            <table class='searchBox'>\n                                <tr>\n                                    <td>\n                                    <input type='hidden' name='all' id='all' value='3' />\n                                    <input type='submit' value='Start now to re-index all' onclick=\"window.open('real_log.php')\" />\n                                    </td>\n                                </tr>\n                            </table>\n                        </form>\n                        <br /><br />\n                        <p class='cntr em'>\n                        <a class='bkbtn' href='admin.php' title='Back to admin'>Return to admin without re-index</a>\n                        <br /><br />\n                        </p>\n                        ";
     }
     break;
 case 46:
     // show all links of current site
     show_links($site_id);
     break;
 case 47:
     // clean categories
     cleanCats();
     break;
 case 48:
     // Erase & Re-index a single site
     refreshSite();
     break;
 case 49:
     // Delete all indexed images and their thumbnails
     $sql_query = "DELETE from " . $mysql_table_prefix . "media where type='image'";
     $db_con->query($sql_query);
     if ($debug && $db_con->errno) {
         $err_row = __LINE__ - 2;
<h2>Below Navigation</h2>
<?php 
show_links('top-navigation');
        exit;
    }
    $num_rows = $result->num_rows;
    if ($num_rows) {
        $link_found = '1';
        $res_array = array();
        while ($this_array = $result->fetch_array(MYSQLI_ASSOC)) {
            $res_array[] = $this_array;
        }
    }
    if ($num_rows > '1') {
        //      multiple choice, select one URL
        multiple_choice($num_rows, $res_array, 5, $urlquery);
    }
    if ($num_rows == '1') {
        $links = show_links($query, $urlquery, $res_array, $mysql_table_prefix, $start_all, 5, $results_per_page, $db, $prefix, $start_links);
    }
}
if ($link_found != 1) {
    //      Nothing found in any database
    $noMatch = str_replace('%query', $urlquery, $sph_messages["noSiteMatch"]);
    echo "\n                <br>\n                <div class='tblhead red'>\n                {$noMatch}\n                </div>\n            ";
    if (!$embedded) {
        echo "\n                    </body>\n                    </html>\n                ";
    }
}
//      display ''Suggest a new URL' and 'footer'
if (!$embedded) {
    include "" . $template_dir . "/html/090_footer.html";
} else {
    include "" . $template_dir . "/html/091_footer.html";
<?php

include $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR . 'lib_db.php';
show_links();
function show_links()
{
    $options = array();
    $options["border"] = "1";
    $grid = new JGrid($options);
    $grid->addRow($options = array());
    $colNum = 'TitleNum';
    $grid->addColumn($colNum);
    $grid->setRowCell($colNum, 'ID');
    $colName = 'TitleName';
    $grid->addColumn($colName);
    $grid->setRowCell($colName, 'Наименование');
    $colParent = 'TitleParent';
    $grid->addColumn($colParent);
    $grid->setRowCell($colParent, 'Родитель');
    $colSyn = 'TitleSynonym';
    $grid->addColumn($colSyn);
    $grid->setRowCell($colSyn, 'Синоним');
    $colDel = 'Delete';
    $grid->addColumn($colDel);
    $grid->setRowCell($colDel, 'Удалить');
    //	$name = 'TitleDesc';
    //	$grid->addColumn($name);
    //	$grid->setRowCell($name, 'Описание');
    $db = new Dbprocess();
    $db->connectToDb();
    $table_prefix = $db->getTablePrefix();
<!--
Quick links page
By Kulvinder Lotay and Artur Barbosa
-->
<!DOCTYPE html>
<html>
<?php 
# Connect to MySQL server and the database
require 'includes/connect_db.php';
# Includes these helper functions
require 'includes/helpers.php';
# Store current page in variable, call show_links and show_records functions using cur_page variable
$cur_page = $_SERVER['PHP_SELF'];
show_links($dbc, $cur_page);
# Show the records
show_page($cur_page, $dbc);
# If user requests item (clicks quick link) make the appropriate GET request from quick links
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
    if (isset($_GET['id']) && isset($_GET['p'])) {
        if ($_GET['p'] == 3) {
            show_record_admin($dbc, $_GET['id'], $_GET['p']);
        } else {
            show_record($dbc, $_GET['id'], $_GET['p']);
        }
    }
} else {
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        if ($_POST['dialog'] == 'contact') {
            $errors = array();
            $from = trim($_POST['email']);
            $message = trim($_POST['msg']);
/**
    * Recursive function to list links as a tree
    * @author Ivan Lucas
*/
function show_links($origtab, $colref, $level = 0, $parentlinktype = '', $direction = 'lr')
{
    global $dbLinkTypes, $dbLinks;
    // Maximum recursion
    $maxrecursions = 15;
    if ($level <= $maxrecursions) {
        $sql = "SELECT * FROM `{$dbLinkTypes}` WHERE origtab='{$origtab}' ";
        if (!empty($parentlinktype)) {
            $sql .= "AND id='{$parentlinktype}'";
        }
        $result = mysql_query($sql);
        if (mysql_error()) {
            trigger_error(mysql_error(), E_USER_WARNING);
        }
        while ($linktype = mysql_fetch_object($result)) {
            // Look up links of this type
            $lsql = "SELECT * FROM `{$dbLinks}` WHERE linktype='{$linktype->id}' ";
            if ($direction == 'lr') {
                $lsql .= "AND origcolref='{$colref}'";
            } elseif ($direction == 'rl') {
                $lsql .= "AND linkcolref='{$colref}'";
            }
            $lresult = mysql_query($lsql);
            if (mysql_error()) {
                trigger_error(mysql_error(), E_USER_WARNING);
            }
            if (mysql_num_rows($lresult) >= 1) {
                if (mysql_num_rows($lresult) >= 1) {
                    $html .= "<ul>";
                    $html .= "<li>";
                    while ($link = mysql_fetch_object($lresult)) {
                        $recsql = "SELECT {$linktype->selectionsql} AS recordname FROM {$linktype->linktab} WHERE ";
                        if ($direction == 'lr') {
                            $recsql .= "{$linktype->linkcol}='{$link->linkcolref}' ";
                        } elseif ($direction == 'rl') {
                            $recsql .= "{$linktype->origcol}='{$link->origcolref}' ";
                        }
                        $recresult = mysql_query($recsql);
                        if (mysql_error()) {
                            trigger_error(mysql_error(), E_USER_WARNING);
                        }
                        while ($record = mysql_fetch_object($recresult)) {
                            if ($link->direction == 'bi') {
                                $html .= "<strong>{$linktype->name}</strong> ";
                            } elseif ($direction == 'lr') {
                                $html .= "<strong>{$linktype->lrname}</strong> ";
                            } elseif ($direction == 'rl') {
                                $html .= "<strong>{$linktype->rlname}</strong> ";
                            } else {
                                $html = $GLOBALS['strError'];
                            }
                            if ($direction == 'lr') {
                                $currentlinkref = $link->linkcolref;
                            } elseif ($direction == 'rl') {
                                $currentlinkref = $link->origcolref;
                            }
                            $viewurl = str_replace('%id%', $currentlinkref, $linktype->viewurl);
                            $html .= "{$currentlinkref}: ";
                            if (!empty($viewurl)) {
                                $html .= "<a href='{$viewurl}'>";
                            }
                            $html .= "{$record->recordname}";
                            if (!empty($viewurl)) {
                                $html .= "</a>";
                            }
                            $html .= " - " . user_realname($link->userid, TRUE);
                            $html .= show_links($linktype->linktab, $currentlinkref, $level + 1, $linktype->id, $direction);
                            // Recurse
                            $html .= "</li>\n";
                        }
                    }
                    $html .= "</ul>\n";
                } else {
                    $html .= "<p>{$GLOBALS['strNone']}</p>";
                }
            }
        }
    } else {
        $html .= "<p class='error'>{$GLOBALS['strError']}: Maximum number of {$maxrecursions} recursions reached</p>";
    }
    return $html;
}
		<div class="modal__container">
            <img class="modal__image" src="" />
            <div class="modal__content">
                <p class="noMargins">

                </p>
                <a class="link" href=""></a>

            </div>
        </div>

</section>

    <section class="orgs">
        <h4 class="orgs__title">Sponsorzy</h4>
        <div class="cardsWrapper">
            <?php 
show_links($sponsors);
?>
        </div>
    </section>

    <section class="orgs">
        <h4 class="orgs__title">Współpraca</h4>
        <div class="cardsWrapper">
            <?php 
show_links($partnerships);
?>
        </div>
    </section>
			</li>
		</ul>';
// get content for menu aside
$aside_snippet['main_menu'] = '';
if ($config['layout']['main_menu'] == 'aside') {
    $menu_links = get_links('site_menu');
    $menu_links = isset($menu_links['site_menu']) ? $menu_links['site_menu'] : '';
    $aside_snippet['main_menu'] = build_snippet('Menu', $menu_links);
}
// get content for blogroll / links aside
$aside_snippet['blogroll'] = '';
$blogroll_links = get_links();
if (!empty($blogroll_links)) {
    $blogroll_snip = array();
    foreach ($blogroll_links as $bl_cat => $bl_links) {
        $links_list = show_links($bl_links);
        $blogroll_snip[] = build_snippet($bl_cat, $links_list);
    }
    $aside_snippet['blogroll'] = implode('', $blogroll_snip);
}
// now we start formatting the above data into snippet-style html using the build_snippet function
if (detect_smartphone() == true) {
    // if the user is using a mobile we'll only show the dropdown lists
    // first we define each snippet and store in a variable
    // here we build the actual html for each snippet
    $aside_snippet['search'] = build_snippet('Search', $search_form);
    $aside_snippet['categories_select'] = build_snippet('Categories', $categories_select_form);
    $aside_snippet['months_select'] = build_snippet('Months', $months_select_form);
    $aside_snippet['authors_select'] = build_snippet('Authors', $authors_select_form);
    $aside_snippet['tags_select'] = build_snippet('Tags', $tags_select_form);
    // then we insert each snippet variable into an array
Exemple #13
0
    <div id="left">
      <h2>Navigation</h2>
	  <div id="leftnav">
		  <?php 
show_sidebar();
?>
		  <?php 
show_content_area('Below Navigation');
?>
	  </div>
    </div>
    <div id="right">
	  <?php 
show_content_slug();
?>
    </div>
 </div>    
 <div id="footer">
 	<div style="float:right"><?php 
show_links('Footer-Right', '%s| &nbsp;');
?>
</div>
	<?php 
show_content_area('Copyright Notice');
?>
	powered by <a href='http://NanoCMS.KalyanChakravarthy.net'>NanoCMS</a>
 </div>
 
</div>  
</body>
</html>