Esempio n. 1
0
<?php

include "functiona.php";
$f = new functiona();
session_start();
$admin = 0;
if (isset($_SESSION["admin"])) {
    $admin = $_SESSION["admin"];
}
$sql = "select * from article order by article_id desc";
$result = $f->tabledata($sql);
//print_r($result);
function truncate($mytext, $id)
{
    //Number of characters to show
    $chars = 200;
    $mytext = substr($mytext, 0, $chars);
    $mytext = substr($mytext, 0, strrpos($mytext, ' '));
    //  $mytext = $mytext." <a href='read.php?id=$id'>read more...</a>";
    return $mytext;
}
?>
<!DOCTYPE html>
<html >
  <head>
    <meta charset="UTF-8">
    <title>Joyfest</title>
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1">
<!--Css files-->
Esempio n. 2
0
<?php

//opening page
include "functiona.php";
session_start();
$f = new functiona();
//received values from form
if (isset($_POST["uname"])) {
    $u_name = $_POST["uname"];
}
if (isset($_POST["password"])) {
    $password = $_POST["password"];
}
if (isset($_POST["article_head"])) {
    $article_head = $_POST["article_head"];
}
if (isset($_POST["article_body"])) {
    $article_body = $_POST["article_body"];
}
if (isset($_POST["title"])) {
    $title = $_POST["title"];
}
if (isset($_POST["content"])) {
    $content = $_POST["content"];
}
if (isset($_POST["event_date"])) {
    $date = $_POST["event_date"];
}
if (isset($_POST["email"])) {
    $email = $_POST["email"];
}