コード例 #1
0
ファイル: index.php プロジェクト: Karpec/gizd
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
ob_start();
$year = date("Y");
?>
<html>
<head><link rel="stylesheet" href="modules/calender/SimpleCalendar.css" /></head>
<body>
<center>
<?php 
require_once 'SimpleCalendar.php';
$calendar = new donatj\SimpleCalendar();
echo date('M Y');
echo "<br><br>";
$calendar->setStartOfWeek('Sunday');
$res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT username, dob  FROM {$TABLE_PREFIX}users where MONTH(dob)=" . date('n'));
while ($row = mysqli_fetch_assoc($res)) {
    $parts = explode('-', $row["dob"]);
    $dobday = $parts[1];
    $dobmonth = $parts[2];
    $name = $row["username"];
    $calendar->addDailyHtml("Birthday: <br>" . $name . "", "" . $year . "-" . $dobday . "-" . $dobmonth . "");
}
$calendar->show(true);
?>
</center>
<?php 
コード例 #2
0
ファイル: basic.php プロジェクト: tgallacher/SimpleCalendar
<html>
<head><link rel="stylesheet" href="../lib/css/SimpleCalendar.css" /></head>
<body>
<?php 
error_reporting(E_ALL ^ E_WARNING);
require_once '../lib/donatj/SimpleCalendar.php';
$calendar = new donatj\SimpleCalendar();
$calendar->setStartOfWeek('Sunday');
$calendar->addDailyHtml('Sample Event', 'today', 'tomorrow');
$calendar->show(true);
?>
</body>
</html>