include("inc.php"); session_start(); $id = $_COOKIE['Prime-id']; $pass = $_COOKIE['Prime-pass']; /* if($id==""){ $id=$_GET['id']; } if($id==""){ if(_S == 1){ header("Location: http://www.jhayashida.co.jp/prime/index.php"); }elseif(_S == 0){ header("Location: http://localhost/public/prime/index.php"); } exit; }*/ $mbu = $_COOKIE['Prime-id']; //MySQLに接続 if(!$conn = mysql_connect(_DB_SERVER,_DB_UID,_DB_PASS)){ die('MySQL接続失敗'); } //データベースの選択 if(!$sts = mysql_select_db(_DB_NAME,$conn)){ die('テーブル選択失敗'); } $sql=""; $sql.="select id,title,bgimg,imgnum,pic1,pic2,pic3,com1,com2,com3,ex,ud,albumcomment,cris,auto_inc from p_album where auto_inc = '$artnum' "; $mq = mysql_query($sql,$conn); if($rec = mysql_fetch_array($mq)){ $ID = _ss($rec['id']); $u1 = _ss($rec['pic1']); $u2 = _ss($rec['pic2']); $u3 = _ss($rec['pic3']); $img1com = _ss($rec['com1']); $img2com = _ss($rec['com2']); $img3com = _ss($rec['com3']); $bgimg = _ss($rec['bgimg']); $imgnum = _ss($rec['imgnum']); $title = $rec['title']; $albumcomment = $rec['albumcomment']; $ex = _ss($rec['ex']); if($ex==0){$ex1="非公開";}else{$ex1="公開";} $date = _ss($rec['ud']); $cris = $rec['cris']; $ai = $rec['auto_inc']; $sqll=""; $sqll.="select name from profile where id = '$ID' "; $mqq = mysql_query($sqll,$conn); if($rec = mysql_fetch_array($mqq)){ $name = $rec['name']; } if(!$name){ $name = $ID; } } $getnum=$artnum; $img1flg=""; $img2flg=""; $img3flg=""; if(file_exists("$u1")){ $img1flg=1; $percent=0; //画像サイズ自動変更処理 list($width, $height) = getimagesize("$u1"); if($width > $height){ if($width > 320){ $percent = 320 / $width; } }elseif($width < $height){ if($height > 240){ $percent = 240 / $height; } }else{ if($width > 320){ $percent = 320 / $width; } if($height > 240){ $percent = 240 / $height; } } if($percent > 0){ $new_width1 = $width * $percent; $new_height1 = $height * $percent; if($new_height1>240){ $percent = 240 / $height; $new_width1 = $width * $percent; $new_height1 = $height * $percent; } }else{ $new_width1 = $width; $new_height1 = $height; } } if(file_exists("$u2")){ $img2flg=1; $percent=0; //画像サイズ自動変更処理 list($width, $height) = getimagesize("$u2"); if($width > $height){ if($width > 320){ $percent = 320 / $width; } }elseif($width < $height){ if($height > 240){ $percent = 240 / $height; } }else{ if($width > 320){ $percent = 320 / $width; } if($height > 240){ $percent = 240 / $height; } } if($percent > 0){ $new_width2 = $width * $percent; $new_height2 = $height * $percent; if($new_height2>240){ $percent = 240 / $height; $new_width1 = $width * $percent; $new_height1 = $height * $percent; } }else{ $new_width2 = $width; $new_height2 = $height; } } if(file_exists("$u3")){ $img3flg=1; $percent=0; //画像サイズ自動変更処理 list($width, $height) = getimagesize("$u3"); if($width > $height){ if($width > 320){ $percent = 320 / $width; } }elseif($width < $height){ if($height > 240){ $percent = 240 / $height; } }else{ if($width > 320){ $percent = 320 / $width; } if($height > 240){ $percent = 240 / $height; } } if($percent > 0){ $new_width3 = $width * $percent; $new_height3 = $height * $percent; if($new_height3>240){ $percent = 240 / $height; $new_width1 = $width * $percent; $new_height1 = $height * $percent; } }else{ $new_width3 = $width; $new_height3 = $height; } } if($img1flg=="" and $img2flg=="" and $img3flg==""){ if(_S == 1){ header("Location: http://www.jhayashida.co.jp/prime/error_album.php"); }elseif(_S == 0){ header("Location: http://localhost/public/prime/error_album.php"); } exit; } ?>
";
for($i=0;$_SESSION['error'][$i]!="";$i++){
$error=$_SESSION['error'][$i];
echo "・"."$error"." "; } echo " |