Ejemplo n.º 1
0
 public function redirect($p)
 {
     $path = FabriqModules::new_model('pathmap', 'Paths');
     $path->get_by_path($p);
     if (count($path)) {
         switch ($path->modpage) {
             case 'module':
                 if (FabriqModules::enabled($path->controller)) {
                     $extra = explode('/', $path->extra);
                     if (count($extra) == 1) {
                         if ($extra[0] == '') {
                             unset($extra[0]);
                         }
                     }
                     PathMap::arg(0, $path->controller);
                     PathMap::arg(1, $path->action);
                     for ($i = 0; $i < count($extra); $i++) {
                         PathMap::arg($i + 2, $extra[$i]);
                     }
                     FabriqStack::enqueue($path->controller, $path->action, 'module', $extra);
                     return true;
                 } else {
                     FabriqStack::error(404);
                 }
                 break;
             case 'page':
             default:
                 PathMap::arg(0, $path->controller);
                 PathMap::arg(1, $path->action);
                 FabriqStack::enqueue($path->controller, $path->action);
                 if ($path->extra != '') {
                     $extra = explode('/', $path->extra);
                     if ($path->wildcard) {
                         $p = explode('/', $_GET['q']);
                         array_unshift($extra, $p[$path->wildcard]);
                     }
                     for ($i = 0; $i < count($extra); $i++) {
                         PathMap::arg($i + 2, $extra[$i]);
                     }
                 } else {
                     if ($path->wildcard) {
                         $p = explode('/', $_GET['q']);
                         PathMap::arg(2, $p[$path->wildcard]);
                     }
                 }
                 return true;
                 break;
         }
     }
     return false;
 }
<h1>Reset password</h1>
<?php 
if ($submitted && Messaging::has_messages()) {
    Messaging::display_messages();
}
if (!$submitted || $submitted && Messaging::has_messages()) {
    ?>
<p>Enter your display name or e-mail address in the field below and click submit.</p>
<form method="post" action="<?php 
    echo PathMap::build_path('users', 'forgotPassword');
    ?>
">
	<p><label for="user">User:</label> <input type="text" size="50" maxlength="100" id="user" name="user" /></p>
	<p><input type="submit" value="Submit" name="submit" /></p>
</form>
<?php 
} else {
    ?>
<p>A new password has been generated and sent the e-mail address associated with your account. You will be asked to change your password the next time you log in.</p>
<p><a href="<?php 
    echo PathMap::build_path('users', 'login');
    ?>
">Return to log in page</a></p>
<?php 
}
Ejemplo n.º 3
0
	</div>
	<div style="padding: 2px;">
		<label for="<?php 
        echo $moduleName;
        ?>
_newWindow">
			<strong>Open in new window:</strong>
		</label>
		<input type="checkbox" value="1" name="<?php 
        echo $moduleName;
        ?>
_newWindow" />
	</div>
	<div style="padding: 2px;">
		<input type="submit" name="submitted" value="Add item" />
	</div>
</form>
<?php 
    } else {
        ?>
<p>Menu item "<?php 
        echo $menuItem->itemName;
        ?>
" has been added.</p>
<p><a href="<?php 
        echo PathMap::build_path('sitemenus', 'items', 'index', $menu->id);
        ?>
">Return to menu items list</a></p>
<?php 
    }
}
Ejemplo n.º 4
0
 /**
  * Add a module stylesheet to the CSS queue
  * @param string $module
  * @param string $stylesheet
  * @param string $media
  * @param string $path
  * @param string $ext;
  */
 public static function add_css($module, $stylesheet, $media = 'screen', $path = '', $ext = '.css')
 {
     if (file_exists('site/' . FabriqStack::site() . "/modules/{$module}/stylesheets/{$path}/{$stylesheet}.{$ext}")) {
         self::$cssqueue[] = array('css' => $stylesheet, 'media' => $media, 'path' => Pathmap::getUrl() . "sites/" . FabriqStack::site() . "/modules/{$module}/stylesheets/{$path}", 'ext' => $ext);
     } else {
         self::$cssqueue[] = array('css' => $stylesheet, 'media' => $media, 'path' => PathMap::getUrl() . "modules/{$module}/stylesheets/{$path}", 'ext' => $ext);
     }
 }
Ejemplo n.º 5
0
 public function show($entry)
 {
     if (FabriqModules::module('roles')->requiresPermission('view blog posts', 'blog')) {
         $blog = FabriqModules::new_model('blog', 'Blogs');
         if (!$entry || !is_numeric($entry)) {
             $blog->find(PathMap::arg(2));
         } else {
             $blog->find($entry);
         }
         if ($blog->title != '' && ($blog->locked == 0 || FabriqModules::module('roles')->requiresPermission('update blog posts', 'blog'))) {
             Fabriq::title('Blog - ' . $blog->title);
             $user = FabriqModules::new_model('users', 'Users');
             $user->find($blog->user);
             $blog->user = $user;
             $taxonomyEnabled = FabriqModules::enabled('taxonomy');
             FabriqModules::set_var('blog', 'taxonomyEnabled', $taxonomyEnabled);
             FabriqModules::set_var('blog', 'blog', $blog);
             $isAdmin = FabriqModules::module('roles')->userHasPermission('update blog posts', 'blog');
             FabriqModules::set_var('blog', 'isAdmin', $isAdmin);
         } else {
             FabriqModules::set_var('blog', 'notFound', true);
             Fabriq::title('Blog entry not found');
         }
     }
 }
Ejemplo n.º 6
0
 public function itemsDestroy()
 {
     if (FabriqModules::module('roles')->requiresPermission('update menus', 'sitemenus')) {
         $menu = FabriqModules::new_model('sitemenus', 'Menus');
         $menu->find(PathMap::arg(3));
         if ($menu->menuName != '') {
             $menuItem = FabriqModules::new_model('sitemenus', 'MenuItems');
             $menuItem->find(PathMap::arg(4));
             if ($menuItem->itemName != '') {
                 Fabriq::title("Add item to menu \"{$menu->menuName}\"");
                 $menu->buildMenu();
                 FabriqModules::set_var('sitemenus', 'menu', $menu);
                 FabriqModules::set_var('sitemenus', 'found', true);
                 FabriqModules::set_var('sitemenus', 'moduleName', $this->name);
                 if (isset($_POST['submitted'])) {
                     $menuItem->destroy();
                     FabriqModules::set_var('sitemenus', 'submitted', true);
                 }
                 FabriqModules::set_var('sitemenus', 'menuItem', $menuItem);
             } else {
                 Fabriq::title("Menu item not found");
                 FabriqModules::set_var('sitemenus', 'found', false);
             }
         } else {
             Fabriq::title("Menu not found");
             FabriqModules::set_var('sitemenus', 'found', false);
         }
     }
 }
Ejemplo n.º 7
0
    ?>
>Start</li>
			<li<?php 
    if (PathMap::arg(2) == 2) {
        echo ' class="current"';
    }
    ?>
>Framework updates</li>
			<li<?php 
    if (PathMap::arg(2) == 3) {
        echo ' class="current"';
    }
    ?>
>Module updates</li>
			<li<?php 
    if (PathMap::arg(2) == 4) {
        echo ' class="current"';
    }
    ?>
>Finish</li>
		</ul>
		<div class="clearbox">&nbsp;</div>
	</section>
</nav>
<?php 
}
?>

<section id="body">
	<section id="content">
Ejemplo n.º 8
0
        ?>
<p style="font-size: 9pt; color: #666;"><strong>Tags:</strong> <?php 
        for ($i = 0; $i < $blog->terms->count(); $i++) {
            echo $blog->terms[$i]->term;
            if ($i < $blog->terms->count() - 1) {
                echo ', ';
            }
        }
    }
    if ($isAdmin) {
        ?>
</p>
<p>
	<button type="button" onclick="window.location = '<?php 
        echo PathMap::build_path('blog', 'update', $blog->id);
        ?>
';">Edit</button>
	<button type="button" onclick="window.location = '<?php 
        echo PathMap::build_path('blog', 'destroy', $blog->id);
        ?>
';">Delete</button>
</p>
	<?php 
    }
    ?>
<p><a href="<?php 
    echo PathMap::build_path('blog');
    ?>
">Return to blog</a></p>
<?php 
}
Ejemplo n.º 9
0
<h1>Access Denied</h1>
<p><strong>You do not have permission to view this page.</strong></p>
<p><strong><a href="<?php 
echo PathMap::build_path($controller, $action);
?>
">Return to homepage</a></strong></p>
Ejemplo n.º 10
0
 /**
  * Build the HTML for this menu item
  */
 public function getItemHtml($admin = false)
 {
     $html = "<li>\n";
     if ($this->path != '') {
         $html .= "\t<a href=\"";
         if ($this->path[0] == '/') {
             $html .= call_user_func_array('PathMap::build_path', explode('/', substr($this->path, 1)));
         } else {
             $html .= $this->path;
         }
         $html .= "\"";
         if ($this->newWindow) {
             $html .= " target=\"_blank\"";
         }
         $html .= ">{$this->itemName}</a>";
     } else {
         $html .= "\t{$this->itemName}";
     }
     if ($admin) {
         $html .= " - <button onclick=\"window.location = '" . PathMap::build_path('sitemenus', 'items', 'update', $this->menu, $this->id) . "'\">Edit</button> <button onclick=\"window.location = '" . PathMap::build_path('sitemenus', 'items', 'destroy', $this->menu, $this->id) . "'\">Delete</button>";
     }
     $html .= "\n";
     if (count($this->children) > 0) {
         $html .= "\t\t<ul>\n";
         for ($i = 0; $i < count($this->children); $i++) {
             $html .= $this->children[$i]->getItemHtml($admin);
         }
         $html .= "\t\t</ul>\n";
     }
     $html .= "</li>\n";
     return $html;
 }
Ejemplo n.º 11
0
        if ($taxonomyEnabled && $entry->terms->count() > 0) {
            ?>
<p style="font-size: 9pt; color: #666;"><strong>Tags:</strong> <?php 
            for ($i = 0; $i < $entry->terms->count(); $i++) {
                echo $entry->terms[$i]->term;
                if ($i < $entry->terms->count() - 1) {
                    echo ', ';
                }
            }
        }
        if ($isAdmin) {
            ?>
</p>
<p>
	<button type="button" onclick="window.location = '<?php 
            echo PathMap::build_path('blog', 'update', $entry->id);
            ?>
';">Edit</button>
	<button type="button" onclick="window.location = '<?php 
            echo PathMap::build_path('blog', 'destroy', $entry->id);
            ?>
';">Delete</button>
</p>
<?php 
        }
    }
} else {
    ?>
<p><strong>There are currently no blog entries available</strong></p>
<?php 
}
Ejemplo n.º 12
0
">Add menu item</a>
</p>
<p><?php 
    echo $menu->description;
    ?>
</p>
<?php 
    if (count($menu->items) > 0) {
        ?>
<ul>
	<?php 
        for ($i = 0; $i < count($menu->items); $i++) {
            echo $menu->items[$i]->getItemHtml(true);
        }
        ?>
</ul>
<?php 
    } else {
        ?>
<p>This menu currently has no items. Use the <strong>Add menu item</strong> link above to add items to the menu.</p>
<?php 
    }
} else {
    ?>
<p>The menu could not be found.</p>
<p><a href="<?php 
    echo PathMap::map_path('sitemenus', 'index');
    ?>
">Return to menu list</a></p>
<?php 
}
 /**
  * Update step 3
  * Module updates
  */
 protected function update_step3($continue = TRUE)
 {
     Fabriq::title('Module Updates');
     global $db;
     // get modules and versions that are in the database
     $query = "SELECT `id`, `module`, `versionInstalled` FROM `fabmods_modules` ORDER BY `module`;";
     $installed = $db->prepare_select($query, array('id', 'module', 'versionInstalled'));
     // look for updates to the installed modules in the code
     $available = array();
     $installs = array();
     for ($i = 0; $i < count($installed); $i++) {
         if (!array_key_exists($installed[$i]['module'], $available)) {
             $available[$installed[$i]['module']] = array();
         }
         $install = "modules/{$installed[$i]['module']}/{$installed[$i]['module']}.install.php";
         if (file_exists($install)) {
             require_once $install;
             eval('$installer = new ' . $installed[$i]['module'] . '_install();');
             $installs[$installed[$i]['module']] = $installer;
             $methods = get_class_methods($installer);
             foreach ($methods as $method) {
                 if (substr($method, 0, 7) == 'update_' && (str_replace('_', '.', str_replace('update_', '', $method)) > $installed[$i]['versionInstalled'] || $installed[$i]['versionInstalled'] == null)) {
                     $available[$installed[$i]['module']][] = array('method' => $method, 'version' => str_replace('_', '.', str_replace('update_', '', $method)));
                 }
             }
         }
     }
     if (isset($_POST['submit'])) {
         foreach ($available as $module => $updates) {
             if (count($updates) > 0) {
                 foreach ($updates as $update) {
                     $installs[$module]->{$update['method']}();
                 }
             }
         }
         if ($continue) {
             header("Location: " . PathMap::build_path('fabriqinstall', 'update', 4));
             exit;
         }
     } else {
         FabriqModules::set_var('fabriqinstall', 'installed', $installed);
         FabriqModules::set_var('fabriqinstall', 'available', $available);
     }
 }
Ejemplo n.º 14
0
	<div style="padding: 2px;">
		<label for="currpwd">
			Current password: <input type="password" name="currpwd" size="50" maxlength="100" id="currpwd" />
		</label>
	</div>
	<div style="padding: 2px;">
		<label for="newpwd">
			New password: <input type="password" name="newpwd" size="50" maxlength="100" id="newpwd" /><br />
			<span style="font-size: 8pt;">Passwords must be at least 8 characters long and must be different from your username and e-mail address.</span>
		</label>
	</div>
	<div style="padding: 2px;">
		<label for="comfnewpwd">
			Comfirm new password: <input type="password" name="comfnewpwd" size="50" maxlength="100" id="comfnewpwd" />
		</label>
	</div>
	<div style="padding: 2px;">
		<input type="submit" name="submit" value="Change password" />
	</div>
</form>
<p>
	<a href="<?php 
echo PathMap::build_path('users', 'updateAccount');
?>
">Update account</a> | 
	<a href="<?php 
echo PathMap::build_path('users', 'myAccount');
?>
">My account</a>
</p>
Ejemplo n.º 15
0
?>
		<div style="padding: 2px;">
			<label for="user">
				User: <input type="text" size="50" maxlength="100" id="user" name="user" />
			</label>
		</div>
		<div style="padding: 2px;">
			<label for "pwd">
				Password: <input type="password" size="50" maxlength="100" id="pwd" name="pwd" />
			</label>
		</div>
		<div style="padding: 2px;">
			<input type="submit" name="submit" id="submit" value="Log in" />
		</div>
		<div style="padding: 2px;">
			<?php 
if ($anyoneCanRegister) {
    ?>
<a href="<?php 
    echo PathMap::build_path('users', 'register');
    ?>
">Sign up</a> |<?php 
}
?>
			<a href="<?php 
echo PathMap::build_path('users', 'forgotpassword');
?>
">Forgot password</a>
		</div>
	</form>
</fieldset>
Ejemplo n.º 16
0
            echo $update['version'];
            ?>
</li>
			<?php 
        }
        ?>
			</ul>
		</li>
		<?php 
    } else {
        ?>
		<li><?php 
        echo $module;
        ?>
 - No updates available</li>
	<?php 
    }
}
?>
	</ul>
</div>
<div class="clearbox"></div>
<form method="post" action="<?php 
PathMap::build_path('fabriqinstall', 'update', 3);
?>
">
	<p style="text-align: right;">
		<input type="submit" name="submit" value="Install module updates and continue &raquo;" />
	</p>
</form>
Ejemplo n.º 17
0
    ?>
<h1>Delete menu?</h1>
<form method="post" action="<?php 
    echo PathMap::build_path('sitemenus', 'destroy', $menu->id);
    ?>
">
	<p>Are you sure you want to delete the menu "<?php 
    echo $menu->menuName;
    ?>
"?</p>
	<p>
		<input type="submit" name="submit" value="Submit" />
		<button type="button" onclick="window.location = '<?php 
    echo PathMap::build_path('sitemenus');
    ?>
';">Cancel</button>
	</p>
</form>
<?php 
} else {
    ?>
<h1>Menu deleted</h1>
<?php 
    Messaging::display_messages('successes');
    ?>
<p><a href="<?php 
    echo PathMap::build_path('sitemenus');
    ?>
">Return to menu list</a></p>
<?php 
}
Ejemplo n.º 18
0
        echo PathMap::build_path('sitemenus', 'items', 'index', $menus[$i]->id);
        ?>
"><?php 
        echo $menus[$i]->menuName;
        ?>
</a>
			</td>
			<td><?php 
        echo $menus[$i]->description;
        ?>
</td>
			<td style="text-align: center;"><button type="button" onclick="window.location = '<?php 
        echo PathMap::build_path('sitemenus', 'update', $menus[$i]->id);
        ?>
';">Edit</button></td>
			<td style="text-align: center;"><button type="button" onclick="window.location = '<?php 
        echo PathMap::build_path('sitemenus', 'destroy', $menus[$i]->id);
        ?>
';">Delete</button></td>
		</tr>
	<?php 
    }
    ?>
	</tbody>
</table>
<?php 
} else {
    ?>
<p><strong>No menus have been created yet.</strong></p>
<?php 
}
Ejemplo n.º 19
0
	</div>
	<div style="padding: 2px;">
		<button type="button" name="submit">Save configuration</button> 
		<button type="button" name="cancel">Cancel</button>
	</div>
</form>
<script language="JavaScript" type="text/javascript" id="ajax-callback">
$(function() {
	$('button[name="cancel"]').click(function(event) {
		Fabriq.UI.Overlay.close();
	});
	$('button[name="submit"]').click(function(event) {
		$.ajax({
			type: 'POST',
			url: Fabriq.build_path('fabriqmodules', 'configure', '<?php 
echo PathMap::arg(2);
?>
'),
			data: {
				anyoneCanRegister: ($('input[name="anyoneCanRegister"]:eq(0)').is(':checked')) ? 1 : 0,
				submit: true
			},
			dataType: 'json',
			success: function(data, status) {
				if (data.success) {
					Fabriq.UI.Overlay.close();
					$('#message-box')
						.addClass('successes')
						.html('Users module configuration has been saved')
						.fadeIn();
				}
Ejemplo n.º 20
0
<h1>Updates Complete</h1>
<p>Updates are now complete.</p>
<?php 
global $_FAPP;
?>
<p><a href="<?php 
echo PathMap::build_path($_FAPP['cdefault'], $_FAPP['adefault']);
?>
">Return to the homepage</a></p>
Ejemplo n.º 21
0
 /**
  * Process everything the queue
  */
 public static function processQueue()
 {
     if (!count(self::$queue)) {
         return false;
     }
     $next = FabriqStack::dequeue();
     while ($next->controller == '') {
         if (!count(self::$queue)) {
             return false;
         }
         FabriqStack::processQueue();
     }
     self::$processing = $next;
     switch ($next->type) {
         case 'module':
             $module =& FabriqModules::module($next->controller);
             call_user_func_array(array($module, $next->action), $next->extra);
             if (Fabriq::render() != 'none' && FabriqModules::has_permission() && !FabriqModules::stopMappedRender()) {
                 FabriqTemplates::renderToBody($next);
             }
             break;
         case 'controller':
         default:
             PathMap::controller($next->controller);
             PathMap::action($next->action);
             $file = "app/controllers/{$next->controller}.controller.php";
             if (file_exists('sites/' . FabriqStack::site() . "/{$file}")) {
                 require_once 'sites/' . FabriqStack::site() . "/{$file}";
             } else {
                 require_once $file;
             }
             $c = "{$next->controller}_controller";
             $controller = new $c();
             $a = str_replace('.', '_', $next->action);
             if (!$controller->hasMethod($a)) {
                 FabriqStack::error(404);
             }
             call_user_func(array($controller, $a));
             FabriqTemplates::renderToBody($next);
             break;
     }
     if (count(self::$queue)) {
         FabriqStack::processQueue();
     }
 }
Ejemplo n.º 22
0
<h1>My Account</h1>
<h3>Welcome, <?php 
echo $_SESSION[Fabriq::siteTitle()]['FABMOD_USERS_displayname'];
?>
</h3>
<ul>
	<li><a href="<?php 
echo PathMap::build_path('users', 'changePassword');
?>
">Change password</a></li>
	<li><a href="<?php 
echo PathMap::build_path('users', 'updateAccount');
?>
">Update account</a></li>
	<li><a href="<?php 
echo PathMap::build_path('users', 'logout');
?>
">Log out</a></li>
</ul>
Ejemplo n.º 23
0
<h1>Core module configuration</h1>
<?php 
if (Messaging::has_messages()) {
    Messaging::display_messages();
} else {
    Messaging::display_messages('successes');
    Messaging::display_messages('warnings');
}
?>
<p><strong>You must create an initial user. This user will be given the administrator role. Users with administrator role can access any areas that are enabled for the role. By default, the user module is configured so that only administrators can add users. This configuration option can be changed later</strong></p>
<form method="post" action="<?php 
echo PathMap::build_path('fabriqinstall', 'install', 4);
?>
">
	<div style="padding: 2px;">
		<label for="display">Display name: </label>
		<input type="text" name="display" id="display" size="24" maxlength="24" /><br />
		<span style="font-size: 8pt;">Display names may only contain charcters, number, and the underscore character between 6 and 24 characters long.</span>
		
	</div>
	<div style="padding: 2px;">
		<label for="email">e-mail address: </label>
		<input type="text" name="email" id="email" size="50" maxlength="100" /><br />
		<span style="font-size: 8pt;">Must be a valid e-mail address. This e-mail address will be used when necessary to contact the user.</span>
		
	</div>
	<div style="padding: 2px;">
		<label for="pwd">Password: </label>
		<input type="password" name="pwd" id="pwd" size="24" /><br />
		<span style="font-size: 8pt;">Passwords must be at least 8 characters long. The user will be forced to change their password after their first log in.</span>
	</div>
Ejemplo n.º 24
0
 public function updateAccount()
 {
     if (!$this->isLoggedIn()) {
         header('Location: ' . PathMap::build_path('users', 'login'));
         exit;
     }
     Fabriq::title('Update account');
     $user = FabriqModules::new_model('users', 'Users');
     $user->find($_SESSION[Fabriq::siteTitle()]['FABMOD_USERS_userid']);
     if (isset($_POST['submit'])) {
         $emailPattern = '/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\\@([a-z0-9])(([a-z0-9-])*([a-z0-9]))+' . '(\\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i';
         $displayPattern = '/([A-z0-9]){6,24}/';
         if (!preg_match($displayPattern, $_POST['display'])) {
             Messaging::message("Display name is invalid");
         }
         if (!preg_match($emailPattern, $_POST['email'])) {
             Messaging::message("e-mail address is invalid");
         }
         if (!Messaging::has_messages()) {
             $user->display = $_POST['display'];
             $user->email = $_POST['email'];
             $user->update();
             $_SESSION[Fabriq::siteTitle()]['FABMOD_USERS_displayname'] = $user->display;
             $_SESSION[Fabriq::siteTitle()]['FABMOD_USERS_email'] = $user->email;
             Messaging::message('Account has bee updated', 'success');
         }
         FabriqModules::set_var('users', 'submitted', true);
     }
     FabriqModules::set_var('users', 'user', $user);
     FabriqModules::add_js('users', 'jquery.validate.min');
     FabriqModules::add_js('users', 'users-updateAccount');
     FabriqModules::add_css('users', 'users-admin');
 }
Ejemplo n.º 25
0
<h1>Install complete</h1>
<p>Congrats! You have just set up your Fabriq application!</p>
<p>Be sure to remove the write permissions for the following directories (<code>chmod 775</code> is sufficient for most systems):</p>
<ul>
	<li><code>sites/<?php 
echo FabriqStack::site();
?>
/config</code></li>
	<li><code>sites/<?php 
echo FabriqStack::site();
?>
/app/controllers</code></li>
	<li><code>sites/<?php 
echo FabriqStack::site();
?>
/app/views</code></li>
</ul>
<p>Now that your Fabriq app is installed, you can delete the .txt files from the root directory of your project.</p>
<p><a href="<?php 
echo PathMap::build_path();
?>
">Return to the Fabriq app's homepage</a></p>
Ejemplo n.º 26
0
<h1>Create blog entry</h1>
<?php 
if ($submitted && Messaging::has_messages()) {
    Messaging::display_messages();
}
?>
<form method="post" action="<?php 
echo PathMap::build_path('blog', 'create');
?>
">
<?php 
if ($submitted && is_numeric($_POST['id'])) {
    ?>
	<input type="hidden" name="id" value="<?php 
    echo $_POST['id'];
    ?>
" />
<?php 
}
?>
	<div style="padding: 2px;">
		<label for="title">Title:</label>
		<input type="text" name="title" size="50" maxlength="100"<?php 
if ($submitted) {
    echo " value=\"{$_POST['title']}\"";
}
?>
 />
	</div>
	<div style="padding: 2px;">
		<label for="body">Body:</label><br />
Ejemplo n.º 27
0
if ($submitted && Messaging::has_messages('successes')) {
    Messaging::display_messages('successes');
}
?>
<p>
	<a href="<?php 
echo PathMap::build_path('fabriqadmin', 'roles', 'create');
?>
">Add role</a> | 
	<a href="<?php 
echo PathMap::build_path('fabriqadmin', 'roles', 'perms');
?>
">Manage permissions</a>
</p>
<form method="post" action="<?php 
PathMap::build_path('fabriqadmin', 'roles', 'manage');
?>
">
<table border="0" style="border: solid 1px #999;" cellspacing="0">
	<thead>
		<tr>
			<th style="width: 300px;">Role</th>
			<th>Enabled</th>
		</tr>
	</thead>
	<tbody>
<?php 
for ($i = 0; $i < $roles->count(); $i++) {
    ?>
		<tr<?php 
    if ($i % 2 == 0) {
Ejemplo n.º 28
0
 */
if ($notFound) {
    ?>
<h1>Not Found</h1>
<p>Blog entry could not be found</p>
<?php 
} else {
    ?>
<h1>Update blog entry</h1>
<?php 
    if ($submitted && Messaging::has_messages()) {
        Messaging::display_messages();
    }
    ?>
<form method="post" action="<?php 
    echo PathMap::build_path('blog', 'update', $blog->id);
    ?>
">
	<div style="padding: 2px;">
		<label for="title">Title:</label>
		<input type="text" name="title" size="50" maxlength="100" value="<?php 
    echo $blog->title;
    ?>
" />
	</div>
	<div style="padding: 2px;">
		<label for="body">Body:</label><br />
		<textarea name="body" style="width: 100%; height: 300px;"><?php 
    echo $blog->body;
    ?>
</textarea>
Ejemplo n.º 29
0
$aPath = explode('/', $aPath);
$i = 0;
while ($aPath[$i] != 'fabriqinstall') {
    $appPath .= $aPath[$i] . '/';
    $i++;
}
if (isset($_SESSION['FAB_INSTALL_site']) && $_SESSION['FAB_INSTALL_site'] != '') {
    $siteConfig = unserialize($_SESSION['FAB_INSTALL_site']);
    $submitted = true;
    foreach ($siteConfig as $key => $val) {
        $_POST[$key] = $val;
    }
}
?>
<form method="post" action="<?php 
PathMap::build_path('fabriqinstall', 'install', 2);
?>
">
	<label for="title">Page title <span class="required-field">*</span>: </label><input type="text" id="title" name="title" size="50" tabindex="1"<?php 
if ($submitted) {
    echo ' value="' . $_POST['title'] . '"';
}
?>
 /><br />
	<label for="title_pos">Page title position <span class="required-field">*</span>: </label><select id="title-pos" name="title_pos" tabindex="2">
		<option value="left"<?php 
if ($submitted && $_POST['title_pos'] == 'left') {
    echo ' selected="selected"';
}
?>
>Left</option>
Ejemplo n.º 30
0
<?php

switch (PathMap::arg(2)) {
    case 2:
        require_once 'modules/fabriqinstall/views/install_step2.view.php';
        break;
    case 3:
        require_once 'modules/fabriqinstall/views/install_step3.view.php';
        break;
    case 4:
        require_once 'modules/fabriqinstall/views/install_step4.view.php';
        break;
    case 5:
        require_once 'modules/fabriqinstall/views/install_step5.view.php';
        break;
    case 1:
    default:
        require_once 'modules/fabriqinstall/views/install_step1.view.php';
        break;
}