Error connecting to MySQL Database. If you are installing SSPAdmin, return to start.php and check your server name. If you have already installed SSPAdmin, your MySQL Server may be down. Contact your host.
'); mysql_select_db($db); // Nothing to see here.. $itbl = $pre.'images'; $atbl = $pre.'albums'; $utbl = $pre.'usrs'; $dtbl = $pre.'dynamic'; $dltbl = $pre.'dynamic_links'; function mysqlclean($array, $index, $maxlength, $connection) { if (isset($array["{$index}"])) { $input = substr($array["{$index}"], 0, $maxlength); $input = mysql_real_escape_string($input, $connection); return ($input); } return NULL; } function getCount($s) { global $atbl, $itbl; if ($s == 'album') $t = $atbl.' WHERE active = 1'; else $t = $itbl; $query = "SELECT id FROM $t"; $result = mysql_query($query); echo(mysql_num_rows($result)); if ($s == 'album') { $query = "SELECT id FROM $atbl WHERE active = '0'"; $result = mysql_query($query); if (mysql_num_rows($result) != 0) echo ' ('.mysql_num_rows($result).' Inactive)'; } } function getAlbumCount($aid) { global $itbl; $query = "SELECT id FROM $itbl WHERE active = '1' AND aid = $aid"; $result = mysql_query($query); echo '('.mysql_num_rows($result).' Active Photos'; $query = "SELECT id FROM $itbl WHERE active = '0' and aid = $aid"; $result = mysql_query($query); if (mysql_num_rows($result) != 0) echo ', '.mysql_num_rows($result).' Inactive'; echo')'; } function writeImageBox($aid,$p,$s) { global $itbl; if (!$s) $tag = ' AND active = 1'; $query = "SELECT * FROM $itbl WHERE aid=$aid{$tag} ORDER BY seq"; $result = mysql_query($query); if (!$s) { echo 'No Albums to Edit. Click here to add an album.
'; } } function dynAlbumsList () { global $dtbl, $adminDir; $query = "SELECT * FROM $dtbl"; $result = mysql_query($query); if (mysql_num_rows($result) != 0) { echo 'No dynamic Galleries Yet. Add One Above.
'; } } function albumsListOrder () { global $atbl, $adminDir; $query = "SELECT * FROM $atbl WHERE Active = '1' ORDER BY displayOrder"; $result = mysql_query($query); if (mysql_num_rows($result) != 0) { echo 'No Active Albums.
'; } } function dynAlbumsListOrder ($did) { global $atbl, $dltbl; $query = "SELECT * FROM $dltbl WHERE did='$did' ORDER BY display"; $result = mysql_query($query); if (mysql_num_rows($result) != 0) { echo 'No Active Albums.
'; } } ?>