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 '
'; echo '

'; } echo '
'; } function albumsList () { global $atbl, $adminDir; $query = "SELECT * FROM $atbl ORDER BY displayOrder"; $result = mysql_query($query); if (mysql_num_rows($result) != 0) { while ($row = mysql_fetch_array($result)) { $aid = $row['id']; $aName = $row['name']; $aDes = $row['description']; $p = $row['path']; $tn = $row['tn']; $st = $row['active']; $start = $row['startHere']; $atn = str_replace(($adminDir.'/'), '', $row['aTn']); if ($st == 1) { $st = 'Active'; $l = 'Make Inactive'; $o = 0; } else { $st = 'Inactive'; $l = 'Make Active'; $o = 1; } if ($atn != '') $atn = ""; if ($st == 'Active') { if ($start == 1) $start = 'Slideshow Starts with This Album (Disable)'; else $start = 'Make this the startHere album'; } else { $start = 'Album must be active to be the startHere album'; } echo '

'.$aName.' '; getAlbumCount($aid); echo '

'.$atn; echo '
'; } } else { 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 ''; } else { 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 ''; } else { 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 ''; } else { echo '

No Active Albums.

'; } } ?>