Newbie Spellweaver
- Joined
- Jan 31, 2014
- Messages
- 9
- Reaction score
- 3
Welcome to this topic, and if you'd please read the big letters up top, you'll know this topic is about Project Crosshair.
Also, a question I've bin getting a lot is "Why 'Crosshair'?"; Well, to be very honest, I don't know x).
So after three days of too much coffee (I know that too much coffee is impossible for someone who develops stuff...) and bad music, I've come up with a style, which has a couple of 'agreements' with other CMS's. So I also want to give credits to Bas and the pixeltime team for the idea of the registration.
As you just read, there are some influences from other designs. I hope you like it...INDEX:
You must be registered to see links
)REGISTRATION:
You must be registered to see links
)(
You must be registered to see links
)(
You must be registered to see links
)(
You must be registered to see links
)ME:
You must be registered to see links
)This is the design untill now. I hope you like it. Drop a comment on it
- The logo adjusts itself if you change the hotelname.
- Edit pages in Housekeeping
- Homes
- Group forums
- VIP points
- Multi-Template
- Multi-Language
A piece of ch.template.php
PHP:
public static function set($key, $value)
{
self::$param['{' . $key . '}'] = $value;
}
public static function setUser($key, $value)
{
self::$user['%' . $key . '%'] = $value;
}
private static function parseParams($content)
{
$keys = array_keys(self::$param);
$values = array_values(self::$param);
$content = str_replace($keys, $values, $content);
if (isset($_SESSION['user']))
{
self::$user = unserialize($_SESSION['user']);
$userkeys = array_keys(self::$user);
$uservalues = array_values(self::$user);
self::$output = str_replace($userkeys, $uservalues, $content);
}
else
{
self::$output = $content;
}
return self::$output;
}
A piece of ch.users.php
PHP:
private function setKey($key, $id)
{
$date = date('H:i');
$query = DB::$conn->prepare('INSERT INTO login_session VALUES (?, ?, ?)');
$query->bind_param('iss', $id, $key, $date);
$query->execute();
$query->close();
}
public function isLogged($key)
{
$query = DB::$conn->prepare('SELECT session_key FROM login_session WHERE session_key = ?');
$query->bind_param('s', $key);
$query->execute();
$query->bind_result($dbkey);
$query->store_result();
if ($query->num_rows() > 0)
{
return true;
}
else
{
return false; .
}
$query->close();
}
Post a comment and let me know!
Cheers,
BW
Btw guys; I'm sorry for the kinda long post! Here's a picture of a potato:
Attachments
You must be registered for see attachments list