Example #1
0
    if (is_home()) {
        if (!$comicpress_options['disable_comic_frontpage']) {
            Protect();
            $comic_query = 'showposts=1&cat=' . get_all_comic_categories_as_cat_string();
            query_posts($comic_query);
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    $temp_single = $wp_query->is_single;
                    $wp_query->is_single = true;
                    comicpress_display_comic_area();
                    $wp_query->is_single = $temp_single;
                    $temp_single = null;
                }
            }
            Restore();
            UnProtect();
            wp_reset_query();
        }
    } else {
        if (is_single() && in_comic_category()) {
            comicpress_display_comic_area();
        }
    }
    ?>

<?php 
    if (is_cp_theme_layout('3c,standard,3c2r')) {
        ?>
<div id="subcontent-wrapper-head"></div>
	<div id="subcontent-wrapper">
Example #2
0
                $poruka .= "<br />Upload GREŠKA ... <br />";
            }
            // Rezultat uploada i restore
            echo ' <table><tr>
        <td height="40" valign="top" bgcolor="#F4F4F4">
		<p align="center"><BR><center>';
            echo $poruka;
            echo '	</center></td></tr></table>';
            // Kraj
        }
    }
    if (isset($_REQUEST['restore']) && isset($_REQUEST['file'])) {
        if ($_REQUEST['restore'] == 'true' && $_REQUEST['file'] != "") {
            $target_path = "backup/" . $_REQUEST['file'] . ".sql";
            $poruka = "File koji se učitava : " . $_REQUEST['file'] . ".sql<br />";
            $poruka .= Restore($target_path);
            // Rezultat restore
            echo ' <table><tr>
			<td height="40" valign="top" bgcolor="#F4F4F4">
			<p align="center"><BR><center>';
            echo $poruka;
            echo '	</center></td></tr></table>';
            // Kraj
        }
    }
    ?>

<?php 
    //define the path as relative
    $path = "backup";
    //using the opendir function