Пример #1
0
}
*/
if (!SellerRatings::newInstance()->checkTable()) {
    SellerRatings::newInstance()->import('sql/seller_ratings.sql');
}
if (!WatchList::newInstance()->checkTable()) {
    WatchList::newInstance()->import('sql/watchlist.sql');
}
if (!UniqueCounter::newInstance()->checkTable()) {
    UniqueCounter::newInstance()->import('sql/unique-counter.sql');
}
if (!PaidAds::newInstance()->checkTable()) {
    PaidAds::newInstance()->import('sql/paid-ads.sql');
}
if (!Subscriber::newInstance()->checkTable()) {
    Subscriber::newInstance()->import('sql/subscriber.sql');
}
/**
classified DATABASE FUNCTION
*/
function nc_osc_install()
{
    //ncdb::newInstance();
}
function nc_osc_uninstall()
{
    hello();
}
osc_add_hook('theme_activate', 'nc_osc_install');
osc_add_hook('theme_delete', 'nc_osc_uninstall');
function nc_install_user_pic_db()
Пример #2
0
* INSTALLING DATABASES
*/
if (!SellerRatings::newInstance()->checkTable()) {
    SellerRatings::newInstance()->import('sql/seller_ratings.sql');
}
if (!WatchList::newInstance()->checkTable()) {
    WatchList::newInstance()->import('sql/watchlist.sql');
}
if (!PaidAds::newInstance()->checkTable()) {
    PaidAds::newInstance()->import('sql/paid-ads.sql');
}
if (!Subscriber::newInstance()->checkTable()) {
    Subscriber::newInstance()->import('sql/subscriber.sql');
}
if (!ProfilePicture::newInstance()->checkTable()) {
    Subscriber::newInstance()->import('sql/ppicture.sql');
}
if (!UniqueCounter::newInstance()->checkTable()) {
    UniqueCounter::newInstance()->import('sql/unique-counter.sql');
}
/**
*   Function to run while installing theme
*/
function nc_osc_install()
{
    //ncdb::newInstance();
}
/**
*   Function to run while uninstalling theme
*/
function nc_osc_uninstall()
Пример #3
0
<?php

/**
 * Classified Ajax Subscription page
 *
 * @package Osclass
 * @subpackage Classified
 */
require_once '../../../oc-load.php';
require_once 'dao-class/subscriber.class.php';
require_once 'includes/helpers.php';
if (isset($_POST['submit_type'])) {
    $settings = $_POST['submit_type'];
    switch ($settings) {
        case 'subscribe_user':
            $email = Params::getParam('subs_email');
            if (Subscriber::newInstance()->checkEmail($email)) {
                echo "Already Subscribed";
            } else {
                Subscriber::newInstance()->SubscribeUser($email);
                echo "Email Subscribed.";
            }
            break;
    }
}
Пример #4
0
     osc_set_preference('paypal_password', $paypal_password, 'classified');
     osc_set_preference('paypal_signature', $paypal_signature, 'classified');
     osc_set_preference('paypal_server_rest', $paypal_server_rest, 'classified');
     osc_set_preference('paypal_server_classic', $paypal_server_classic, 'classified');
     osc_set_preference('paypal_client_id', $paypal_client_id, 'classified');
     osc_set_preference('paypal_secret', $paypal_secret, 'classified');
     osc_set_preference('paypal_status', $paypal_status, 'classified');
     osc_set_preference('paypal_server', $paypal_server, 'classified');
     break;
 case 'send_newsletter':
     $subject = Params::getParam('newsletter_subject');
     $message = Params::getParam('newsletter_message');
     //$message = stripslashes($message) ;
     $message = str_replace('src="../', 'src="' . osc_base_url() . '/', $message);
     $recipients = array();
     $recipients = Subscriber::newInstance()->listAll();
     foreach ($recipients as $user) {
         $params = array('subject' => $subject, 'to' => $user['subs_email'], 'to_name' => osc_page_title(), 'body' => $message, 'alt_body' => strip_tags($message), 'add_bcc' => '', 'from' => 'donotreply@' . osc_get_domain());
         osc_sendMail($params);
         //osc_add_flash_ok_message(__($user['subs_email'], 'nepcoders'),'admin');
     }
     break;
 case 'payment_info':
     $publish_fee_check = Params::getParam('publish_fee_check');
     $publish_cost = Params::getParam('publish_cost');
     $premium_fee_check = Params::getParam('premium_fee_check');
     $premium_cost = Params::getParam('premium_cost');
     $premium_days = Params::getParam('premium_days');
     $default_currency = Params::getParam('default_currency');
     osc_set_preference('publish_fee_check', $publish_fee_check, 'classified');
     osc_set_preference('publish_cost', $publish_cost, 'classified');