Location: PHPKode > scripts > Pay Per Click (PPC) module for Esvon Classifieds > pay-per-click-ppc-module-for-esvon-classifieds/Pay_Per_Click/readme.txt
// --------------------------------------------------------------------------
//
// Esvon Classifieds v.3.0
// Copyright(C), Esvon LLC, 2001-2003, All Rights Reserved.
// E-mail: hide@address.com
//
// All forms of reproduction, including, but not limited to, internet posting, 
// printing, e-mailing, faxing and recording are strictly prohibited.
// One license required per site running Esvon Classifieds. 
// To obtain a license for using Esvon Classifieds, please register at
// http://www.esvon.com/pg/products/p_classifieds/
//
// Last modified: 23-Jan-2004
//
// --------------------------------------------------------------------------

Module: Pay Per Click
Version: 1.0

Important: Don't forget to setup classifieds cron job (period <= 1 day)

----------------------------------
Templates integration instructions
----------------------------------

1/ Link to "Pay Per Click" is as following (recommended to be added into 
user_menu.htm) :

<a href="modules.php?mod=Pay_Per_Click">Pay Per Click</a>

2/ Edit inc/pages/account.php file

Change

  $res = $db->query('SELECT link_id AS lid,approved,'.$TITLE_FIELD.' AS ltitle,
  hits, DATE_FORMAT(exp_date,"'.DATE_FMT.'") AS exp_date, DATE_FORMAT(hw_added,"'.DATE_FMT.'") AS hw_added,
  exp_date<NOW() AS expired,hw_pay_plan,
  catid AS cid FROM '.TBL_AD.' WHERE userid='.$ses_uid.$t_q.' ORDER BY cid,'.$TITLE_FIELD." LIMIT  $number, ".DISP_ROWS);

Add "hw_ppc_bided," after "hw_pay_plan,"
Row after changes:

  $res = $db->query('SELECT link_id AS lid,approved,'.$TITLE_FIELD.' AS ltitle,
  hits, DATE_FORMAT(exp_date,"'.DATE_FMT.'") AS exp_date, DATE_FORMAT(hw_added,"'.DATE_FMT.'") AS hw_added,
  exp_date<NOW() AS expired,hw_pay_plan,hw_ppc_bided,
  catid AS cid FROM '.TBL_AD.' WHERE userid='.$ses_uid.$t_q.' ORDER BY cid,'.$TITLE_FIELD." LIMIT  $number, ".DISP_ROWS);

3/ Update tpl/my_listings.htm file.

Add "[B] - Bid/Details" after "[E] - Enable/Disable,"

Also add

<a title="Bid/Details" href="modules.php?mod=Pay_Per_Click&pg=bid&id=##lid##" class=txt8>
<!-- IF ##hw_ppc_bided## -->
<font color=red>[B]</font>
<!-- ELSE -->
[B]
<!-- ENDIF -->
</a>

after (or according to your design)

<!-- IF ##EN_APR_REQ## != "1" -->
<a title="Enable/Disable" href="index.php?page=account&lid=##lid##&switch_active=##approved##" class=txt8>[E]</a>
<!-- ENDIF -->

4/ Edit inc/pages/search.php file.
Add

    $ql.='hw_ppc_bid_amt DESC,';
    
after

    $ql.=' ORDER BY ';
    
5/ Edit inc/pages/out.php file

Add

  require_once SITE_PATH.'modules/Pay_Per_Click/ppc.lib.php';
  Pay_Per_Click_process_click();
  
after

  if(!IsBanned($id,HIT_UNBAN)){
    $db->query ('UPDATE '.TBL_AD.' set hits=hits+1 where link_id="'.$id.'"');
Return current item: Pay Per Click (PPC) module for Esvon Classifieds