$v) {
unset($process[$key][$k]);
if (is_array($v)) {
$process[$key][stripslashes($k)] = $v;
$process[] = &$process[$key][stripslashes($k)];
} else {
$process[$key][stripslashes($k)] = stripslashes($v);
}
}
}
unset($process);
}
$file = __FILE__;
$title = "RCTS";
$body = "about";
$zzz_form_id = 0;
$photo_id = 20;
require("php/dbinit.inc");
function _HAS( $s ) {
$HAS_t = $_POST[ $s ];
if (( is_null( $HAS_t )) || ( strlen( $HAS_t ) == 0 )) {
$HAS_t = $_GET[ $s ];
}
return $HAS_t;
}
require("php/rawhdr.inc");
function legitimate( $s ) {
if ( is_null( $s )) { return 1; }
$n = strlen( $s );
for ( $i=0; $i<$n-1; $i++ ) {
if (((( substr( $s, $i, 1 ) == "<" ) && ( substr( $s, $i+1, 5 ) == "photo" ))
|| ( substr( $s, $i, 1 ) == "[" )) && ( substr( $s, $i+1, 1 ) != " " )) {
return 0;
}
}
return 1;
}
function score_legitimacy( $s, $domain, $inc ) {
if ( is_null( $s )) { return 0; }
$n = strlen( $s );
$legit = 0;
$results = mysql_query( "SELECT text, score FROM spamwords" );
while ( $row = mysql_fetch_assoc( $results )) {
$word = $row[ "text" ];
$word_len = strlen( $word );
$score = $row[ "score" ];
$l_ch = ' ';
echo "check " . $word . "
";
for ( $i=0; $i<$n; $i++ ) {
$ch = $s[ $i ];
if (( ! ctype_alpha( $ch )) || ( ! ctype_alpha( $l_ch ))) {
if ( strcasecmp( substr( $s, $i, $word_len ), $word ) == 0 ) {
$legit += $score;
echo "spam score" . $legit . "
";
}
}
$l_ch = $ch;
}
}
mysql_free_result( $results );
for ( $i=0; $i<$n; $i++ ) {
if ( substr( $s, $i, 4 ) == "[url" ) {
return 10 * $inc;
}
if ( strcasecmp( substr( $s, $i, 13 ), "fake passport" ) == 0 ) {
return 10 * $inc;
}
if ( strcasecmp( substr( $s, $i, 11 ), "tnaflix.com" ) == 0 ) {
$legit += 100;
}
if ( strcasecmp( substr( $s, $i, 14 ), "members.mdi.me" ) == 0 ) {
$legit += 100;
}
if ( strcasecmp( substr( $s, $i, 11 ), "top.wink.ws" ) == 0 ) {
$legit += 100;
}
if ( strcasecmp( substr( $s, $i, 5 ), " seo " ) == 0 ) {
$legit += 5 * $inc;
}
if ( strcasecmp( substr( $s, $i, 6 ), " porn " ) == 0 ) {
$legit += 5 * $inc;
}
if ( strcasecmp( substr( $s, $i, 8 ), " vagina " ) == 0 ) {
$legit += 5 * $inc;
}
if ( strcasecmp( substr( $s, $i, 6 ), " pedo " ) == 0 ) {
$legit += 5 * $inc;
}
if ( strcasecmp( substr( $s, $i, 6 ), " fuck " ) == 0 ) {
$legit += 5 * $inc;
}
if ( strcasecmp( substr( $s, $i, 8 ), " fucked " ) == 0 ) {
$legit += 5 * $inc;
}
if ( strcasecmp( substr( $s, $i, 9 ), " fucking " ) == 0 ) {
$legit += 5 * $inc;
}
if ( strcasecmp( substr( $s, $i, 5 ), "href=" ) == 0 ) {
$legit += $inc;
}
if ( strcasecmp( substr( $s, $i, 7 ), "http://" ) == 0 ) {
$legit += $inc;
}
if ( strcasecmp( substr( $s, $i, 8 ), "https://" ) == 0 ) {
$legit += $inc;
}
if ( strcasecmp( substr( $s, $i, 4 ), "www." ) == 0 ) {
$legit += $inc;
}
if ( $domain ) {
if ( strcasecmp( substr( $s, $i, 4 ), ".com" ) == 0 ) {
$legit += $inc;
}
if ( strcasecmp( substr( $s, $i, 6 ), ".co.uk" ) == 0 ) {
$legit += $inc;
}
if ( strcasecmp( substr( $s, $i, 3 ), ".us" ) == 0 ) {
$legit += $inc;
}
}
}
return $legit;
}
function legitimate2( $s, $location, $email ) {
$legit = 0;
if ( $s == $location ) {
$legit += 16;
}
$legit += score_legitimacy( $s, true, 2 );
if ( strlen( $location ) > 30 ) {
$legit += strlen( $location ) - 30;
}
if ( $location == "return editkey5(event)" ) {
$legit += 100;
} else
if ( $location == "New York" ) {
$legit += 100;
} else
if ( substr( $location, 0, 14 ) == "return editkey" ) {
$legit += 20;
}
$legit += score_legitimacy( $location, true, 10 );
$legit += score_legitimacy( $email, false, 2 );
$where = "( comments.sys_email = '" . mysql_real_escape_string( $email ) . "' )";
$where2 = "( comments.sys_expires > NOW() ) AND (( comments.sys_approved < NOW() ) OR ( comments.sys_ip = '" . $_SERVER['REMOTE_ADDR'] . "' ))";
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( $_GET["img"] == "all" ) {
$where2 = "( comments.sys_expires > NOW() ) AND ( comments.sys_approved IS NULL )";
} else {
$where2 = "( comments.sys_expires > NOW() )";
}
}
if ( $where == "" ) {
$where = $where2;
}
else
{
$where = "(" . $where . ") AND " . $where2
; }
$sql = "SELECT COUNT(*) AS cnt FROM comments WHERE " . $where . " AND ( NOW() < comments.sys_expires )";
$result = mysql_query( $sql );
$row = mysql_fetch_assoc( $result );
if (( is_null( $row )) || ( $row[ "cnt" ] == 0 )) {
$legit += 2;
;}
if ( $legit >= 60 ) {
return -1;
}
return $legit;
}
function getentities( $s ) {
return htmlentities( str_replace( "&", "%26", $s ));
}
function _getattribute( $tbl, $key, $attr ) {
$getattribute_text = "";
$getattribute_sql = "SELECT text FROM " . mysql_real_escape_string( $tbl ) . " WHERE id = '" . mysql_real_escape_string( $key ) . "' AND attr = '" . mysql_real_escape_string( $attr ) . "' AND ( sys_expires > NOW() ) LIMIT 0, 1";
$getattribute_count = 0;
$getattribute_result = mysql_query( $getattribute_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $getattribute_result ) {
while ( $getattribute_row = mysql_fetch_assoc( $getattribute_result )) {
$getattribute_count++;
$getattribute_text = $getattribute_row[ "text" ];
}
mysql_free_result( $getattribute_result );
}
return $getattribute_text;
}
function getattribute( $tbl, $key_cl, $key_img, $attr ) {
return _getattribute( $tbl, $key_cl . "/". $key_img, $attr );
}
function _getattributes( $tbl, $key, $attr ) {
$getattributes_text = array();
$getattribute_sql = "SELECT serial, text FROM " . mysql_real_escape_string( $tbl ) . " WHERE id = '" . mysql_real_escape_string( $key ) . "' AND attr = '" . mysql_real_escape_string( $attr ) . "' AND ( sys_expires > NOW() ) ORDER BY serial ASC";
$getattribute_count = 0;
$getattribute_result = mysql_query( $getattribute_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $getattribute_result ) {
while ( $getattribute_row = mysql_fetch_assoc( $getattribute_result )) {
$getattribute_count++;
$getattributes_text[] = $getattribute_row[ "serial" ];
$getattributes_text[] = $getattribute_row[ "text" ];
}
mysql_free_result( $getattribute_result );
}
return $getattributes_text;
}
function getattributes( $tbl, $key_cl, $key_img, $attr ) {
return _getattributes( $tbl, $key_cl . "/". $key_img, $attr );
}
function getbrackets( $key_cl, $key_img ) {
return _getattributes( "brackets", $key_cl . "/". $key_img, "bracket" );
}
function addattribute( $tbl, $key, $parent_row_id, $attr, $v, $serial ) {
$debug = 2;
echo "set " . $key . " row_id=" . $parent_row_id . " attr=" . $attr . " serial=[" . $serial . "]=" . $v . "
";
$setattribute2_sql = "INSERT INTO " . mysql_real_escape_string( $tbl ) . " ( sys_created, sys_approved, sys_expires, id, parent_row_id, attr, text, serial ) VALUES ( STR_TO_DATE( '" . date( "d/m/Y" ) . "', '%d/%m/%Y' ), STR_TO_DATE( '" . date( "d/m/Y" ) . "', '%d/%m/%Y' ), STR_TO_DATE( '" . mysql_real_escape_string( '31/12/2099' ) . "', '%d/%m/%Y' ), '" . mysql_real_escape_string( $key ) . "', $parent_row_id, '" . mysql_real_escape_string( $attr ) . "', '" . mysql_real_escape_string( $v ) . "', '" . mysql_real_escape_string( $serial ) . "')";
$setattribute2_result = mysql_query( $setattribute2_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $debug > 0 ) {
if ( ! $setattribute2_result ) {
echo "SQL " . $setattribute2_sql . "
";
echo mysql_error() . "
";
}
}
}
function _clearattribute( $tbl, $key, $parent_row_id, $attr, $serial ) {
echo "_clear " . $key . $parent_row_id . $attr . "[" . $serial . "]";
$clearattribute2_sql = "DELETE FROM " . mysql_real_escape_string( $tbl ) . " WHERE id = '" . mysql_real_escape_string( $key ) . "' AND parent_row_id = " . $parent_row_id . " AND attr = '" . mysql_real_escape_string( $attr ) . "' AND serial = '" . mysql_real_escape_string( $serial ) . "'";
$clearattribute2_result = mysql_query( $clearattribute2_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $debug > 0 ) {
if ( ! $clearattribute2_result ) {
echo "SQL " . $clearattribute2_sql . "
";
echo mysql_error() . "
";
}
}
}
function setattribute( $tbl, $key, $parent_row_id, $attr, $v ) {
setattribute2( $tbl, $key, $parent_row_id, $attr, $v, 0 );
}
function setattribute2( $tbl, $key, $parent_row_id, $attr, $v, $serial ) {
$debug = 2;
echo "setattribute2 " . $tbl . " " . $key . $parent_row_id . $attr . $v . "
";
$setattribute_sql = "SELECT row_id FROM " . mysql_real_escape_string( $tbl ) . " WHERE id = '" . mysql_real_escape_string( $key ) . "' AND attr = '" . mysql_real_escape_string( $attr ) . "' AND serial = '" . mysql_real_escape_string( $serial ) . "' AND ( sys_expires > NOW() )";
$setattribute_count = 0;
$setattribute_result = mysql_query( $setattribute_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $setattribute_result ) {
while ( $setattribute_row = mysql_fetch_assoc( $setattribute_result )) {
$setattribute_count++;
$setattribute2_sql = "UPDATE " . mysql_real_escape_string( $tbl ) . " SET text = '" . mysql_real_escape_string( $v ) . "', parent_row_id = " . $parent_row_id . ", sys_sync = 0, sys_updated = STR_TO_DATE( '" . date( "d/m/Y" ) . "', '%d/%m/%Y' ) WHERE row_id = " . $setattribute_row[ "row_id" ];
$setattribute2_result = mysql_query( $setattribute2_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $debug > 0 ) {
if ( ! $setattribute2_result ) {
echo "SQL " . $setattribute2_sql . "
";
echo mysql_error() . "
";
}
}
}
mysql_free_result( $setattribute_result );
}
if ( $setattribute_count == 0 )
{
echo "attribute not found - using addattribute for " . $tbl . "." . $key . "." . $attr . "=" . $v . "
";
addattribute( $tbl, $key, $parent_row_id, $attr, $v, $serial );
}
}
function saveattributes( $cl, $img, $subject, $location ) {
$saveattributes_sql = "SELECT row_id FROM photographs WHERE ( cl = '" . mysql_real_escape_string( $cl ) . "' ) AND ( img = '" . mysql_real_escape_string( $img ) . "' ) AND ( sys_expires > NOW() )";
$saveattributes_count = 0;
$saveattributes_result = mysql_query( $saveattributes_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $saveattributes_result ) {
while ( $saveattributes_row = mysql_fetch_assoc( $saveattributes_result )) {
$saveattributes_count++;
if ( $subject != "" ) {
setattribute( "attributes", $cl . "/" . $img, $saveattributes_row[ "row_id" ], "subject", $subject );
}
if ( $location != "" ) {
setattribute( "attributes", $cl . "/" . $img, $saveattributes_row[ "row_id" ], "location", $location );
}
}
mysql_free_result( $saveattributes_result );
}
}
global $___table;
$___table = "";
global $___attribute_table;
$___attribute_table = "";
global $___cl;
$___cl = "";
global $___img;
$___img = "";
function saveattributesxml( $table, $attribute_table, $cl, $img, $attributes ) {
echo "saveattributesxml " . $attributes . "
";
global $___table;
$___table = $table;
global $___attribute_table;
$___attribute_table = $attribute_table;
global $___cl;
$___cl = $cl;
global $___img;
$___img = $img;
$xml_parser = xml_parser_create();
xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($xml_parser, XML_OPTION_SKIP_WHITE, 0);
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "contents");
if ( ! xml_parse( $xml_parser, $attributes, true )) {
die( sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
xml_parser_free( $xml_parser );
}
global $___content;
$___content = "";
function startElement($parser, $name, $attrs) {
global $___content;
$___content = "";
echo "start " . $name . "
";
}
function endElement($parser, $name) {
global $___content;
if (( $name != "root" ) && ( strlen( $___content ) > 0 )) {
global $___table;
global $___attribute_table;
global $___cl;
global $___img;
echo "endElement
";
echo "table " . $___table . "
";
echo "attribute_table " . $___attribute_table . "
";
echo "cl " . $___cl . "
";
echo "img " . $___img . "
";
echo "name " . $name . "
";
echo "content " . $___content . "
";
saveattribute( $___table, $___attribute_table, $___cl, $___img, str_replace( "_", " ", $name ), $___content );
$___content = "";
}
}
function contents($parser, $data) {
global $___content;
$___content = $___content . $data;
}
function savewatermark( $cl, $img, $watermark ) {
$saveattributes_sql = "SELECT row_id FROM photographs WHERE ( cl = '" . mysql_real_escape_string( $cl ) . "' ) AND ( img = '" . mysql_real_escape_string( $img ) . "' ) AND ( sys_expires > NOW() )";
$saveattributes_count = 0;
$saveattributes_result = mysql_query( $saveattributes_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $saveattributes_result ) {
while ( $saveattributes_row = mysql_fetch_assoc( $saveattributes_result )) {
$saveattributes_count++;
if ( $watermark != "" ) {
setattribute( "attributes", $cl . "/" . $img, $saveattributes_row[ "row_id" ], "watermark", $watermark );
}
}
mysql_free_result( $saveattributes_result );
}
}
function savestatus( $cl, $img, $status ) {
$saveattributes_sql = "SELECT row_id FROM photographs WHERE ( cl = '" . mysql_real_escape_string( $cl ) . "' ) AND ( img = '" . mysql_real_escape_string( $img ) . "' ) AND ( sys_expires > NOW() )";
$saveattributes_count = 0;
$saveattributes_result = mysql_query( $saveattributes_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $saveattributes_result ) {
while ( $saveattributes_row = mysql_fetch_assoc( $saveattributes_result )) {
$saveattributes_count++;
if ( $status != "" ) {
setattribute( "attributes", $cl . "/" . $img, $saveattributes_row[ "row_id" ], "status", $status );
}
}
mysql_free_result( $saveattributes_result );
}
}
function savetext( $cl, $img, $text ) {
$saveattributes_sql = "SELECT row_id FROM photographs WHERE ( cl = '" . mysql_real_escape_string( $cl ) . "' ) AND ( img = '" . mysql_real_escape_string( $img ) . "' ) AND ( sys_expires > NOW() )";
$saveattributes_count = 0;
$saveattributes_result = mysql_query( $saveattributes_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $saveattributes_result ) {
while ( $saveattributes_row = mysql_fetch_assoc( $saveattributes_result )) {
$saveattributes_count++;
if ( $text != "" ) {
setattribute( "attributes", $cl . "/" . $img, $saveattributes_row[ "row_id" ], "text", $text );
}
}
mysql_free_result( $saveattributes_result );
}
}
function savebracket( $cl, $img, $bracket, $serial ) {
echo "save bracket " . $cl . $img . "=" . $bracket . "
";
$saveattributes_sql = "SELECT row_id FROM photographs WHERE ( cl = '" . mysql_real_escape_string( $cl ) . "' ) AND ( img = '" . mysql_real_escape_string( $img ) . "' ) AND ( sys_expires > NOW() )";
$saveattributes_count = 0;
$saveattributes_result = mysql_query( $saveattributes_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $saveattributes_result ) {
while ( $saveattributes_row = mysql_fetch_assoc( $saveattributes_result )) {
$saveattributes_count++;
if ( $bracket != "" ) {
addattribute( "brackets", $cl . "/" . $img, $saveattributes_row[ "row_id" ], "bracket", $bracket, $serial );
}
}
mysql_free_result( $saveattributes_result );
}
}
function clearattribute( $cl, $img, $attr, $serial ) {
echo "clearattribute " . $cl . $img . "." . $attr . "[" . $serial . "]" . "
";
$clearattribute_sql = "SELECT row_id FROM photographs WHERE ( cl = '" . mysql_real_escape_string( $cl ) . "' ) AND ( img = '" . mysql_real_escape_string( $img ) . "' ) AND ( sys_expires > NOW() )";
$clearattribute_count = 0;
$clearattribute_result = mysql_query( $clearattribute_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $clearattribute_result ) {
while ( $clearattribute_row = mysql_fetch_assoc( $clearattribute_result )) {
$clearattribute_count++;
_clearattribute( "attributes", $cl . "/" . $img, $clearattribute_row[ "row_id" ], $attr, $serial );
}
mysql_free_result( $clearattribute_result );
}
}
function clearbracket( $cl, $img, $serial ) {
echo "clearbracket " . $cl . $img . ".bracket, [" . $serial . "]" . "
";
$clearbracket_sql = "SELECT row_id FROM photographs WHERE ( cl = '" . mysql_real_escape_string( $cl ) . "' ) AND ( img = '" . mysql_real_escape_string( $img ) . "' ) AND ( sys_expires > NOW() )";
$clearbracket_count = 0;
$clearbracket_result = mysql_query( $clearbracket_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $clearbracket_result ) {
while ( $clearbracket_row = mysql_fetch_assoc( $clearbracket_result )) {
$clearbracket_count++;
_clearattribute( "brackets", $cl . "/" . $img, $clearbracket_row[ "row_id" ], "bracket", $serial );
}
mysql_free_result( $clearbracket_result );
}
}
function saveattribute( $tbl1, $tbl2, $cl, $img, $attr, $text ) {
$saveattribute_sql = "SELECT row_id FROM " . mysql_real_escape_string( $tbl1 ) . " WHERE ( cl = '" . mysql_real_escape_string( $cl ) . "' ) AND ( img = '" . mysql_real_escape_string( $img ) . "' ) AND ( sys_expires > NOW() )";
$saveattribute_count = 0;
$saveattribute_result = mysql_query( $saveattribute_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $saveattribute_result ) {
while ( $saveattribute_row = mysql_fetch_assoc( $saveattribute_result )) {
$saveattribute_count++;
if ( $text != "" ) {
echo "saveattribute " . $cl . $img . $attr . "=" . $text . "
";
setattribute( $tbl2, $cl . "/" . $img, $saveattribute_row[ "row_id" ], $attr, $text );
}
}
mysql_free_result( $saveattribute_result );
}
}
function savevaultattribute( $cl, $ref, $attr, $text ) {
$saveattributes_sql = "SELECT row_id FROM vault WHERE ( cl = '" . mysql_real_escape_string( $cl ) . "' ) AND ( ref = '" . mysql_real_escape_string( $ref ) . "' ) AND ( sys_expires > NOW() )";
$saveattributes_count = 0;
$saveattributes_result = mysql_query( $saveattributes_sql );
if ( $_SESSION["authority_id"] == "webmaster" ) {
if ( mysql_errno ) {
echo mysql_error();
}
}
if ( $saveattributes_result ) {
while ( $saveattributes_row = mysql_fetch_assoc( $saveattributes_result )) {
$saveattributes_count++;
if ( $text != "" ) {
setattribute( "vault_attributes", $cl . "/" . $ref, $saveattributes_row[ "row_id" ], $attr, $text );
}
}
mysql_free_result( $saveattributes_result );
}
}
?>
logout: " . $_SESSION["authority_user"] . "
";
echo "change password
" . $nbsp . " | " . $detag_link . $detag_img . $detag_link2 . " |
" . $nbsp . " | " . $detag_link . "" . $detag_text . "" . $detag_link2 . " |
" . $nbsp . " | " . $detag_link . $detag_img . $detag_link2 . " |
" . $nbsp . " |
" . $nbsp . " | " . $detag_link . "" . $detag_text . "" . $detag_link2 . " | |
" . $nbsp . " | ||
Purchased images are not watermarked. For permission to publish images contact photoarchive@rcts.org.uk A reproduction fee will usually be payable"; $detag_img .= ""; $detag_img .= ""; $detag_img .= " |
" )) === FALSE )) { $s = substr( $s, 0, $a ) . "
" . substr( $s, $a+3 ); } while ( ! (( $a = strpos( $s, "
" )) === FALSE )) { $s = substr( $s, 0, $a ) . "
" . substr( $s, $a+3 );
}
$a = 0;
while ( ! (( $a = strpos( $s, "
";
$s = substr( $s, 0, $a ) . $s2 . substr( $s, $a+7 );
$a += strlen( "
" );
}
$a = 0;
while ( ! (( $a = strpos( $s, "", $a )) === FALSE ))
{
$s2 = "
";
$s = substr( $s, 0, $a ) . $s2 . substr( $s, $a+7 );
$a += strlen( "
" );
}
$a = 0;
while ( ! (( $a = strpos( $s, "
", $a );
if ( $b === FALSE )
{ break; }
$len = 6;
while (( $s[ $a+$len ] >= '0' ) && ( $s[ $a+$len ] <= '9' )){
$len++;
; }
; $sizset = 0;
if ( $len == 6 ) {
$siz = "192";
} else {
$siz = substr( $s, $a+6, $len-6 );
$sizset = 1;
}
while ( $s[ $a+$len ] == ' ' ) {
$len++;
; }
; $pic = substr( $s, $a+$len, $b-$a-$len );
$align = "center";
$caption = 1;
$link = 1;
if ( $detag_style == "thumb" ) {
$align = "thumb";
}
if ( substr( $pic, 0, 4 ) == "raw " ) {
$align = "none";
$detag_style = "raw";
$pic = substr( $pic, 4 );
} else
if ( substr( $pic, 0, 5 ) == "none " ) {
$align = "none";
$pic = substr( $pic, 5 );
} else
if ( substr( $pic, 0, 7 ) == "center " ) {
$align = "center";
$pic = substr( $pic, 7 );
} else
if ( substr( $pic, 0, 5 ) == "left " ) {
$align = "left";
$pic = substr( $pic, 5 );
} else
if ( substr( $pic, 0, 6 ) == "right " ) {
$align = "right";
$pic = substr( $pic, 6 );
}
if ( substr( $pic, 0, 10 ) == "nocaption " ) {
$caption = 0;
$pic = substr( $pic, 10 );
}
if ( substr( $pic, 0, 7 ) == "nolink " ) {
$link = 0;
$pic = substr( $pic, 7 );
}
$photo_id++;
$t_photo = NULL;
if ( $link > 0 ) {
$t_photo = "photo" . $photo_id;
}
$detag_img = ____img( $t_photo, $pic, $detag_style, $align, $sizset, $siz, $caption, $link, NULL );
$detag_img2 = ____img( NULL, $pic, $detag_style, "center", 1, 1200, $caption, 0, "dynamic_image" );
$photo_cnt++;
$s = substr( $s, 0, $a ) . $detag_img . substr( $s, $b+1 ) . "
";
}
if ( $photo_cnt > 0 ) {
$s = $s . "
";
}
return $s;
}
function mailto( $href, $name )
{
if (( $a = strpos( $href, "@" )) === FALSE )
{
return "" . $name . "";
}
return "" . $name . "";
}
function html( $s )
{
$a = 0;
while (( $a = strpos( $s, "&", $a )) !== FALSE )
{
$s = substr( $s, 0, $a ) . "&" . substr( $s, $a+1 );
$a += 5;
}
return $s;
}
?>
15 )) {
$s = substr( $s, 0, strlen( $s ) - strlen( $a ) ) . "/19" . substr( $a, 1 );
}
$j = 0;
for ( $i=0; $i";
$watermark = html_entity_decode( getattribute( "attributes", $row[ "cl" ], $row[ "img" ], "watermark" ));
if (( is_null( $bracket )) || ( strlen( $bracket ) == 0 )) {
$img = $row[ "href" ];
} else {
$img = $row[ "cl" ] . "/" . $bracket;
}
echo doimg4( $img, $width, 800, $watermark );
echo " ";
echo " \n";
}
mysql_free_result( $result );
$rowcount++;
?>
";
$t_row = "row" . $rowcount;
if ( $_SESSION["authority_id"] == "webmaster" ) {
echo "
";
}
if (( $isedit ) && ( isset( $_POST[$t_row] ))) {
if (( $isedit ) && ( isset( $_POST[$t_row] ))) {
echo "";
$save = 1;
} else {
echo htmlentities( $row[ "cl" ]);
}
echo " serial:";
if (( $isedit ) && ( isset( $_POST[$t_row] ))) {
echo "";
$save = 1;
} else {
$tmp = $row[ "sys_order" ];
echo htmlentities( $tmp );
}
}
$subjectorlocation = 0;
if (( $_SESSION["authority_id"] == "webmaster" ) && ( ! $isedit )) {
echo "
";
echo "Subject";
$select_row_value = getattribute( "attributes", $row[ "cl" ], $row[ "img" ], "subject" );
if ( strpos( $_SERVER['HTTP_USER_AGENT'], "Googlebot" ) === FALSE ) {
$selected_array = array();
$text_array = array();
$selected_row_ok = 0;
$selected_sql = "SELECT DISTINCT text FROM attributes WHERE ( attr = 'subject' ) AND ( sys_expires > NOW()) AND ( sys_approved < NOW()) ORDER BY text ASC";
$select_result = mysql_query( $selected_sql );
if ( $debug > 0 ) {
if ( ! $select_result ) {
echo "SQL " . $selected_sql . "
";
echo mysql_error() . "
";
}
}
while ( $select_row = mysql_fetch_assoc( $select_result )) {
$selected_array[] = $select_row[ 'text' ];
$text_array[] = $select_row[ 'text' ];
if ( $select_row_value == $select_row[ 'text' ] ) {
$selected_row_ok = 1;
}
}
mysql_free_result( $select_result );
$selected_array_count = count( $selected_array );
if ( $selected_array_count > 0 ) {
echo "
";
}
} else {
echo "";
}
echo "
";
echo "
";
echo "Location";
$select_row_value = getattribute( "attributes", $row[ "cl" ], $row[ "img" ], "location" );
$selected_array = array();
$text_array = array();
$selected_row_ok = 0;
$selected_sql = "SELECT DISTINCT text FROM attributes WHERE ( attr = 'location' ) AND ( sys_expires > NOW()) AND ( sys_approved < NOW()) ORDER BY text ASC";
$select_result = mysql_query( $selected_sql );
if ( $debug > 0 ) {
if ( ! $select_result ) {
echo "SQL " . $selected_sql . "
";
echo mysql_error() . "
";
}
}
while ( $select_row = mysql_fetch_assoc( $select_result )) {
$selected_array[] = $select_row[ 'text' ];
$text_array[] = $select_row[ 'text' ];
if ( $select_row_value == $select_row[ 'text' ] ) {
$selected_row_ok = 1;
}
}
mysql_free_result( $select_result );
$selected_array_count = count( $selected_array );
?>
40 ) {
echo "
";
?>
" name="="row" . $rowcount . "_location"?>" autocomplete="off"
";
?>