Ejemplo n.º 1
0
function widget_pages()
{
    echo "<ul>";
    foreach (get_posts("page") as $page) {
        ?>
<li><a href="<?php 
        echo get_blog_stuff("url");
        echo get_page_stuff($page, "title");
        ?>
.htm"><?php 
        echo get_page_stuff($page, "title");
        ?>
</a><?php 
    }
    echo "</ul>";
}
Ejemplo n.º 2
0
function widget_posts()
{
    echo "<ul>";
    foreach (get_posts() as $post) {
        ?>
<li><a href="<?php 
        echo get_blog_stuff("url");
        ?>
blog.htm#post<?php 
        echo $post;
        ?>
"><?php 
        echo get_post_stuff($post, "title");
        ?>
</a><?php 
    }
    echo "</ul>";
}
Ejemplo n.º 3
0
function hook($hook)
{
    // hooks stuff from plugins
    foreach (scandir(abspath . "/plugins") as $plugin) {
        if ($plugin != "." and $plugin != "..") {
            if (get_plugin_stuff($plugin, "active") == TRUE and in_array($hook, get_plugin_stuff($plugin, "hook"))) {
                if (is_dir(abspath . "/plugins/" . $plugin) and file_exists(abspath . "/plugins/" . $plugin . "/" . $plugin . ".php")) {
                    require_once abspath . "/plugins/" . $plugin . "/" . $plugin . ".php";
                } elseif (strrpos($plugin, ".php")) {
                    require_once abspath . "/plugins/" . $plugin;
                } elseif (strrpos($plugin, ".rb")) {
                    echo "<span class='ruby'>" . exec("ruby " . abspath . "/plugins/" . $plugin) . "</span>";
                } elseif (strrpos($plugin, ".js")) {
                    echo "<script src='" . get_blog_stuff("url") . "plugins/" . $plugin . "'></script>";
                }
            }
        }
    }
    // hooks stuff from from the theme
    include_once abspath . "/themes/" . $GLOBALS["theme"] . "/functions.php";
}
Ejemplo n.º 4
0
<h1><?php 
echo "<a href='" . get_blog_stuff('url') . "'>" . get_blog_stuff("title") . "</a>";
?>
</h1>

<i><?php 
echo get_blog_stuff("desc");
?>
</i>
<ul id="menu" class="menu">
<?php 
include abspath . "/themes/" . $theme . "/menus/menu.php";
foreach ($menu as $page) {
    ?>
<li><a href="<?php 
    echo get_blog_stuff("url") . $page[1];
    ?>
"><?php 
    echo $page[0];
    ?>
</a><?php 
}
?>
</ul>
</div>
<div id="page">
<h2><?php 
echo get_title();
?>
</h2>
Ejemplo n.º 5
0
    echo $item;
    ?>
</a></li><?php 
}
?>
	</ul></li>
	<?php 
if (user == FALSE) {
    echo "<span class='userbar-link-li'>Not logged in! <a href='" . get_blog_stuff("url") . "login.php'>go login now!</a></span>";
} else {
    ?>
<li><a  id="userbar-username" href="<?php 
    echo get_blog_stuff("url");
    ?>
admin/users.php?action=me">
<img class="userbar-icon" src="
<?php 
    echo get_user_stuff(get_user_stuff(user, "email"), "avatar");
    ?>
">
				<ul>
					<li><a href="<?php 
    echo get_blog_stuff("url");
    ?>
admin/users.php?action=me">Me</a></li>
				</ul>
			</li></a>
<?php 
}
?>
</ul>
Ejemplo n.º 6
0
            echo get_post_stuff($post, "user");
            ?>
</td>
			</tr><?php 
        }
    }
    ?>
</table><?php 
}
if ($_POST["action"] == "addnew") {
    if (post_exists($_POST["id"], "post")) {
        $data = "title='" . $_POST["title"] . "', content='" . $_POST["content"] . "'";
        update_post($_POST["id"], $data);
        echo "updated post!";
        echo "<a href=?action=new&id=" . $_POST["id"] . ">Edit again</a> | ";
        echo "<a href=" . get_blog_stuff("url") . "blog.htm#post" . $_POST["id"] . ">Visit</a>";
    } else {
        insert_post($_POST["title"], $_POST["content"]);
        echo "inserted post";
    }
} elseif ($_GET["action"] == "new") {
    ?>
<form method="post" action="<?php 
    echo $_SERVER["PHP_SELF"];
    ?>
">
<input type="hidden" name="action" value="addnew">
<input name="title" id="title" value="<?php 
    echo get_post_stuff($_GET["id"], "title");
    ?>
">
Ejemplo n.º 7
0
</div>
<div id="footer">
Using <?php 
if (is_udb()) {
    echo "OC-WSS-uDB";
} else {
    echo "OC-WSS";
}
?>
 version <?php 
echo clrfver(get_blog_stuff("version"));
?>
 and PHP version <?php 
echo clrfver(phpversion());
hook("befooter");
?>
Programmed by <a href="http://twitter.com/densnallakillen">densnallakillen</a>
</div>
</body>
</html>
Ejemplo n.º 8
0
        }
    }
    ?>
</table><?php 
}
if ($_POST["action"] == "addnew") {
    if (post_exists($_POST["id"], "page")) {
        $data = "title='" . $_POST["title"] . "', content='" . $_POST["content"] . "'";
        update_page($_POST["id"], $data);
        echo "updated post!";
        echo "<a href=?action=new&id=" . $_POST["id"] . ">Edit again</a> | ";
        echo "<a href=" . get_blog_stuff("url") . get_post_stuff($_POST["id"], "title") . ">Visit</a>";
    } else {
        create_page($_POST["title"], $_POST["content"]);
        echo "created page!";
        echo "<a href=" . get_blog_stuff("url") . "?p=" . $_POST["id"] . ">Visit</a>";
    }
} elseif ($_GET["action"] == "new") {
    ?>
<form method="post" action="<?php 
    echo $_SERVER["PHP_SELF"];
    ?>
">
<input type="hidden" name="action" value="addnew">
<input name="title" id="title" value="<?php 
    echo get_page_stuff($_GET["id"], "title");
    ?>
">
<input name="id" type="hidden" value="<?php 
    echo $_GET["id"];
    ?>
Ejemplo n.º 9
0
<?php 
} elseif ($_GET["action"] == "installnew") {
    if (is_writeable(abspath . "/themes")) {
        oct_install($_GET["theme"], "t");
    } else {
        echo "<span class='error'>you need to chmod the themes folder.</span>";
    }
} else {
    ?>
<div id="page-su-header"><?php 
    include_once "../includes/forms/search.php";
    include_once "../includes/forms/sort_items.php";
    ?>
<a href="?action=new" class="button">Add New</a>
<strong>Active Theme:</strong> <?php 
    echo $theme;
    ?>
</div><?php 
    $dir = scandir(abspath . "/themes");
    if (isset($_GET["order"]) and $_GET["order"] == "desc") {
        rsort($dir);
    }
    foreach ($dir as $theme) {
        if ($theme == "." or $theme == "..") {
        } else {
            include abspath . "/themes/" . $theme . "/" . $theme . ".php";
            echo "<div class='theme item'><img class='screenshot' src='" . get_blog_stuff("url") . "themes/" . $theme . "/screenshot.png'><h4>" . $theme . "</h4></div>";
        }
    }
}
include_once 'footer.php';