PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Gerry Danen  >  Theme Roller  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample usage
Class: Theme Roller
Generate CSS stylesheets with color palette themes
Author: By
Last change: Updated
Date: 6 years ago
Size: 2,122 bytes


Class file image Download
// chosen theme is stored in a session variable

''; // prepares $themeCSS and set session variable

require_once 'themeContent.php'; // this does the same thing as theme.php, except that certain vars are now exposed

$options = ThemeRoller::themeOptionSelect();
$chosenTheme = $_SESSION['theme']['choice'];

echo <<<EOX
<!DOCTYPE html>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="/favicon.ico">
    <title>ThemeRoller: Danen-Dev</title>
    <link rel="stylesheet" type="text/css" href="
<p class="taCenter bold under">A note outside the panel-body div.</p>
<div class="panel-body">
    <h1>ThemeRoller Demo</h1>
    <p id="introText">ThemeRoller provides a simple way to manage CSS themes without the need for a pre-processor.</p>
    <p>The theme.php file calls on themeContent.php, which can be modified to add additional colours, selectors, and
    <div style="margin: 6px;padding: 8px 12px;" class="reverse-panel-body">
        <h2>Theme Palette Code:
$chosenTheme (this div uses reverse-panel-body)</h2>
    <form action="sample.php" method="get" class="rollerSpecial">
        <label for="themename">Select a theme colour:</label>
        <select name="themename" id="themename" style="width: 200px;">
        <button type="submit"> Go</button>
    <p class="taRight"><a style="padding:2px 4px;background-color:#FFF;" href="sample2.php?
$queryParameters">Load sample 2</a></p>
    <div style="margin: 6px 6px 16px 6px;padding: 8px 12px 18px 12px;" class="grnDark yelLightBackground">
    <div style="margin: 6px;padding: 8px 12px;" class="themeColorDark themeColorLightBackground">
        <h2>CSS generated and used</h2>
        <pre class="themeColorDark themeColorLightBackground">

For more information send a message to info at phpclasses dot org.