ajax preview,ajax_getPreview.php

/**

* Silurus Classifieds Builder

*

*

* @authorSnowHall - http://snowhall.com

* @websitehttp://snowhall.com/silurus

* @emailsupport@snowhall.com

*

* @version2.0

* @dateMarch 7, 2013

*

* Silurus is a professionally developed PHP Classifieds script that was built for you.

* Whether you are running classifieds for autos, motorcycles, bicycles, rv's, guns,

* horses, or general merchandise, our product is the right package for you.

* It has template system and no limit to usage with free for any changes.

*

* Copyright (c) 2009-2013

*/

include("./include_php/init.php");

include("./include_php/TemplVotingView.php");

$type = intval($_GET['type']);

$id = intval($_GET['id']);

$book = mysql_fetch_assoc(mysql_query("select * from Store where type=".($type-1)." and ID=".$id));

$categ = mysql_fetch_assoc(mysql_query("select * from StoreCategories where ID=".$book['categoryID']));

$user = mysql_fetch_assoc(mysql_query("select * from Profiles where ID=".intval($book['userID'])));

$oVotingView = new TemplVotingView ('gvoting', 0);

$oVotingView->_fRate = $book['rating'];

$vote1 = $oVotingView->getSmallVoting (0,'');

$book['title_short'] = strlen($book['Title'])>30?substr(htmlspecialchars($book['Title']),0,30).'...':htmlspecialchars($book['Title']);

$book['price'] = number_format($book['price'],2,".","");

if($type==1)

{

$book['url'] = 'product';

$book['prefix'] = '';

}

else

{

$book['url'] = 'wproduct';

$book['prefix'] = '_b';

}

$img = '';

$photos = array();

$q = mysql_query("select v.* from StorePropValues v inner join StoreProp p on p.ID=v.PropID where v.itemID=".$id." and p.Type=3 limit 1");

while($arr = mysql_fetch_assoc($q))

{

if(is_file("./media/store/small_".$arr['Value']))

$book['Photo1'] = $arr['Value'];

}

$smarty->assign("vote1", $vote1);

$smarty->assign("book", $book);

$smarty->assign("categ", $categ);

$smarty->assign("user", $user);

show_smarty_template('ap_preview');

?>

一键复制

编辑

Web IDE

原始数据

按行查看

历史

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值