<?php
/*********************/
/* */
/* Dezend for PHP5 */
/* NWS */
/* Nulled.WS */
/* */
/*********************/
define( "ROOTPATH", "../../" );
include( ROOTPATH."includes/admin.inc.php" );
include( "language/".$sLan.".php" );
include( "func/upload.inc.php" );
needauth( 182 );
$act = $_POST['act'];
switch ( $act )
{
case "proplist" :
$catid = $_POST['catid'];
$nowid = $_POST['nowid'];
if ( $nowid != "" && $nowid != "0" )
{
$msql->query( "select * from {P}_photo_con where id='{$nowid}'" );
if ( $msql->next_record( ) )
{
$prop1 = $msql->f( "prop1" );
$prop2 = $msql->f( "prop2" );
$prop3 = $msql->f( "prop3" );
$prop4 = $msql->f( "prop4" );
$prop5 = $msql->f( "prop5" );
$prop6 = $msql->f( "prop6" );
$prop7 = $msql->f( "prop7" );
$prop8 = $msql->f( "prop8" );
$prop9 = $msql->f( "prop9" );
$prop10 = $msql->f( "prop10" );
$prop11 = $msql->f( "prop11" );
$prop12 = $msql->f( "prop12" );
$prop13 = $msql->f( "prop13" );
$prop14 = $msql->f( "prop14" );
$prop15 = $msql->f( "prop15" );
$prop16 = $msql->f( "prop16" );
}
}
$str = "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='0' >";
$i = 1;
$msql->query( "select * from {P}_photo_prop where catid='{$catid}' order by xuhao" );
while ( $msql->next_record( ) )
{
$propname = $msql->f( "propname" );
$pn = "prop".$i;
$str .= "<tr>";
$str .= "<td width='100' height='30' align='center' >".$propname."</td>";
$str .= "<td height='30' >";
$str .= "<input type='text' name='".$pn."' value='".$$pn."' class='input' style='width:499px;' />";
$str .= "</td>";
$str .= "</tr>";
$i++;
}
$str .= "</table>";
echo $str;
exit( );
break;
case "addpage" :
$nowid = $_POST['nowid'];
$xuhao = 0;
if ( $nowid != "" && $nowid != "0" )
{
$msql->query( "select max(xuhao) from {P}_photo_pages where photoid='{$nowid}'" );
if ( $msql->next_record( ) )
{
$xuhao = $msql->f( "max(xuhao)" );
}
$xuhao = $xuhao + 1;
$msql->query( "insert into {P}_photo_pages set photoid='{$nowid}',xuhao='{$xuhao}' " );
}
echo "OK";
exit( );
break;
case "photopageslist" :
$nowid = $_POST['nowid'];
$pageinit = $_POST['pageinit'];
$str = "<ul>";
$str .= "<li id='p_0' class='pages'>1</li>";
$i = 2;
$id = 0;
$msql->query( "select id from {P}_photo_pages where photoid='{$nowid}' order by xuhao" );
while ( $msql->next_record( ) )
{
$id = $msql->f( "id" );
$str .= "<li id='p_".$id."' class='pages'>".$i."</li>";
$i++;
}
if ( $pageinit != "new" )
{
$id = $pageinit;
}
$str .= "<li id='addpage' class='addbutton'>".$strphotoPagesAdd."</li>";
if ( $pageinit != "0" )
{
$str .= "<li id='pagedelete' class='addbutton'>".$strphotoPagesDel."</li>";
$str .= "<li id='backtomodi' class='addbutton'>".$strBack."</li>";
}
$str .= "</ul><input id='photopagesid' name='photopagesid' type='hidden' value='".$id."'>";
echo $str;
exit( );
break;
case "getcontent" :
$nowid = $_POST['nowid'];
$photopageid = $_POST['photopageid'];
if ( $photopageid == "-1" )
{
$src = "";
}
else if ( $photopageid == "0" )
{
$msql->query( "select src from {P}_photo_con where id='{$nowid}'" );
if ( $msql->next_record( ) )
{
$src = $msql->f( "src" );
}
}
else
{
$msql->query( "select src from {P}_photo_pages where id='{$photopageid}'" );
if ( $msql->next_record( ) )
{
$src = $msql->f( "src" );
}
else
{
$src = "";
}
}
echo $src;
exit( );
break;
case "photomodify" :
$id = $_POST['id'];
$pid = $_POST['pid'];
$catid = $_POST['catid'];
$page = $_POST['page'];
$body = $_POST['body'];
$title = htmlspecialchars( $_POST['title'] );
$author = htmlspecialchars( $_POST['author'] );
$source = htmlspecialchars( $_POST['source'] );
$memo = htmlspecialchars( $_POST['memo'] );
$oldcatid = $_POST['oldcatid'];
$oldcatpath = $_POST['oldcatpath'];
$prop1 = htmlspecialchars( $_POST['prop1'] );
$prop2 = htmlspecialchars( $_POST['prop2'] );
$prop3 = htmlspecialchars( $_POST['prop3'] );
$prop4 = htmlspecialchars( $_POST['prop4'] );
$prop5 = htmlspecialchars( $_POST['prop5'] );
$prop6 = htmlspecialchars( $_POST['prop6'] );
$prop7 = htmlspecialchars( $_POST['prop7'] );
$prop8 = htmlspecialchars( $_POST['prop8'] );
$prop9 = htmlspecialchars( $_POST['prop9'] );
$prop10 = htmlspecialchars( $_POST['prop10'] );
$prop11 = htmlspecialchars( $_POST['prop11'] );
$prop12 = htmlspecialchars( $_POST['prop12'] );
$prop13 = htmlspecialchars( $_POST['prop13'] );
$prop14 = htmlspecialchars( $_POST['prop14'] );
$prop15 = htmlspecialchars( $_POST['prop15'] );
$prop16 = htmlspecialchars( $_POST['prop16'] );
$prop17 = htmlspecialchars( $_POST['prop17'] );
$prop18 = htmlspecialchars( $_POST['prop18'] );
$prop19 = htmlspecialchars( $_POST['prop19'] );
$prop20 = htmlspecialchars( $_POST['prop20'] );
$tags = $_POST['tags'];
$spe_selec = $_POST['spe_selec'];
$pic = $_FILES['jpg'];
$body = url2path( $body );
if ( 0 < $pic['size'] )
{
$Meta = "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>";
}
if ( $title == "" )
{
echo $Meta.$strphotoNotice6;
exit( );
}
if ( 200 < strlen( $title ) )
{
echo $Meta.$strphotoNotice7;
exit( );
}
if ( 65000 < strlen( $memo ) )
{
echo $Meta.$strphotoNotice4;
exit( );
}
if ( 65000 < strlen( $body ) )
{
echo $Meta.$strphotoNotice5;
exit( );
}
$uptime = time( );
$msql->query( "select catpath from {P}_photo_cat where catid='{$catid}'" );
if ( $msql->next_record( ) )
{
$catpath = $msql->f( "catpath" );
}
$count_pro = count( $spe_selec );
$i = 0;
for ( ; $i < $count_pro; $i++ )
{
$projid = $spe_selec[$i];
$projpath .= $projid.":";
}
if ( 0 < $pic['size'] )
{
$nowdate = date( "Ymd", time( ) );
$picpath = "../pics/".$nowdate;
@mkdir( @$picpath, 511 );
$uppath = "photo/pics/".$nowdate;
$arr = newuploadimage( $pic['tmp_name'], $pic['type'], $pic['size'], $uppath );
if ( $arr[0] != "err" )
{
$src = $arr[3];
}
else
{
echo $Meta.$arr[1];
- 1
- 2
- 3
前往页