<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=paytop.done
 * [END_COT_EXT]
 */
/**
 * UserPoints plugin
 *
 * @package userpoints
 * @version 2.0.0
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_incfile('userpoints', 'plug');
cot_setuserpoints($cfg['plugin']['userpoints']['top'], 'top', $pay['pay_userid']);
<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=folio.edit.public
 * [END_COT_EXT]
 */
/**
 * UserPoints plugin
 *
 * @package userpoints
 * @version 2.0.0
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_incfile('userpoints', 'plug');
if ($ritem['item_state'] != $item['item_state']) {
    if ($ritem['item_state'] == 0) {
        cot_setuserpoints($cfg['plugin']['userpoints']['portfolioaddtocat'], 'portfolioaddtocat', $item['item_userid'], $id);
    } else {
        cot_setuserpoints(-$cfg['plugin']['userpoints']['portfolioaddtocat'], 'portfoliodeltocat', $item['item_userid'], $id);
    }
}
<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=projects.offers.setperformer
 * [END_COT_EXT]
 */
/**
 * UserPoints plugin
 *
 * @package userpoints
 * @version 2.0.0
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_incfile('userpoints', 'plug');
cot_setuserpoints($cfg['plugin']['userpoints']['performer'], 'performer', $userid, $id);
if ((int) $lastperformer['user_id'] > 0) {
    cot_setuserpoints($cfg['plugin']['userpoints']['refuse'], 'refuse', $lastperformer['user_id'], $id);
}
<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=users.auth.check.done
 * [END_COT_EXT]
 */
/**
 * UserPoints plugin
 *
 * @package userpoints
 * @version 2.0.0
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_incfile('userpoints', 'plug');
$lastlog = $db->query("SELECT item_date FROM {$db_userpoints} \n\tWHERE item_userid=" . $ruserid . " AND item_type='auth' ORDER by item_date DESC LIMIT 1")->fetchColumn();
if ($lastlog + 86400 < $sys['now']) {
    cot_setuserpoints($cfg['plugin']['userpoints']['auth'], 'auth', $ruserid);
    $db->update($db_users, array('user_userpointsauth' => $sys['now']), "user_id=" . $ruserid);
}
<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=reviews.add.add.done
 * [END_COT_EXT]
 */
/**
 * UserPoints plugin
 *
 * @package userpoints
 * @version 2.0.0
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_incfile('userpoints', 'plug');
$plusneg = $ritem['item_score'] > 0 ? 'reviewplus' : 'reviewminus';
cot_setuserpoints($cfg['plugin']['userpoints'][$plusneg], $plusneg, $ritem['item_touserid']);
<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=projects.offers.refuse
 * [END_COT_EXT]
 */
/**
 * UserPoints plugin
 *
 * @package userpoints
 * @version 2.0.0
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_incfile('userpoints', 'plug');
cot_setuserpoints($cfg['plugin']['userpoints']['refuse'], 'refuse', $userid, $id);
Esempio n. 7
0
<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=global
 * [END_COT_EXT]
 */
/**
 * Userpoints plugin
 *
 * @package freelancers
 * @version 2.0.1
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_incfile('userpoints', 'plug');
if ($usr['id'] > 0) {
    if (!empty($usr['profile']['user_userpointsauth']) && $usr['profile']['user_userpointsauth'] + 86400 < $sys['now']) {
        cot_setuserpoints($cfg['plugin']['userpoints']['auth'], 'auth', $usr['id']);
        $db->update($db_users, array('user_userpointsauth' => $sys['now']), "user_id=" . $usr['id']);
    }
}
<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=paypro.done
 * [END_COT_EXT]
 */
/**
 * UserPoints plugin
 *
 * @package userpoints
 * @version 2.0.0
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_incfile('userpoints', 'plug');
cot_setuserpoints($cfg['plugin']['userpoints']['pro'], 'pro', $pay['pay_code']);