コード例 #1
0
ファイル: auto.php プロジェクト: RenzcPHP/3dproduct
 public function update_order()
 {
     plan::get_instance()->expired_plan();
     //过期自动返还
     //北单自动兑奖
     $bjdc_obj = Plans_bjdcService::get_instance();
     $results = $bjdc_obj->get_unpaijiang_id();
     if (empty($results)) {
         return;
     }
     foreach ($results as $row) {
         $bjdc_obj->bonus_plan($row);
     }
 }
コード例 #2
0
ファイル: planHeader.class.php プロジェクト: GaelGRIFFON/core
 public function getPlan()
 {
     return plan::byPlanHeaderId($this->getId());
 }
コード例 #3
0
ファイル: plan.configure.php プロジェクト: GaelGRIFFON/core
<?php

if (!isConnect('admin')) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
$plan = plan::byLinkTypeLinkIdPlanHedaerId(init('link_type'), init('link_id'), init('planHeader_id'));
if (!is_object($plan)) {
    throw new Exception('Impossible de trouver le design');
}
$link = $plan->getLink();
sendVarToJS('id', $plan->getId());
?>
<div id="div_alertPlanConfigure"></div>
<a class='btn btn-success btn-xs pull-right cursor' style="color: white;" id='bt_saveConfigurePlan'><i class="fa fa-check"></i> Sauvegarder</a>
<a class='btn btn-danger  btn-xs pull-right cursor' style="color: white;" id='bt_removeConfigurePlan'><i class="fa fa-times"></i> Supprimer</a>
<form class="form-horizontal">
    <fieldset id="fd_planConfigure">
        <legend>Général</legend>
        <input type="text"  class="planAttr form-control" data-l1key="id" style="display: none;"/>
        <input type="text"  class="planAttr form-control" data-l1key="link_type" style="display: none;"/>
        <?php 
if ($plan->getLink_type() == 'eqLogic' || $plan->getLink_type() == 'scenario') {
    ?>
           <div class="form-group">
            <label class="col-lg-4 control-label">{{Taille du widget}}</label>
            <div class="col-lg-2">
                <?php 
    if ($plan->getLink_type() == 'eqLogic') {
        echo '<input type="text" class="planAttr form-control" data-l1key="css" data-l2key="zoom" value="0.65"/>';
    }
    if ($plan->getLink_type() == 'scenario') {
コード例 #4
0
ファイル: users.php プロジェクト: xornob/fcc-signup
  * @param subscription $b The second subscription
  */
 function date_sort($a, $b)
 {
     if ($a->sub_date_created === $b->sub_date_created) {
         return 0;
     }
     return strtotime($a->sub_date_created) < strtotime($b->sub_date_created) || $a->sub_status === 'deleted' && $b->sub_status !== 'deleted' ? 1 : -1;
 }
 $subs = subscription::get_by_user($user_id);
 usort($subs, "date_sort");
 if ($subs) {
     echo '<table class="table">' . '</td><td>Plan</td><td>Start Date</td><td>Payment Schedule</td><td></td></tr>';
     foreach ($subs as $_sub) {
         $date = strtotime($_sub->sub_date_created);
         echo '<tr class="' . ($_sub->sub_status === 'active' ? 'success' : ($_sub->sub_status === 'suspended' ? 'warning' : ($_sub->sub_status === 'pending' ? 'info' : 'danger'))) . '">' . '<td>' . plan::get_instance($_sub->sub_plan)->plan_name . '</td>' . '<td>' . (date('y', $date) == '15' ? date('F j', $date) : date('n/j/Y', $date)) . '</td>' . "<td>{$_sub->sub_pmt_schedule}</td>" . '<td>';
         if ($_sub->sub_status === 'suspended') {
             if ($_sub->sub_balance > 0) {
                 echo "Suspended - Balance due \${$_sub->sub_balance}";
             }
         } else {
             if ($_sub->sub_status === 'pending') {
                 echo 'Awaiting verification';
             } else {
                 if ($_sub->sub_status === 'active') {
                     echo "Active";
                 } else {
                     echo "Deleted";
                 }
             }
         }
コード例 #5
0
ファイル: plan.ajax.php プロジェクト: GaelGRIFFON/core
     $plan = plan::byId(init('id'));
     if (is_object($plan)) {
         ajax::success(utils::o2a($plan));
     }
     $plan = plan::byLinkTypeLinkIdObjectId(init('link_type'), init('link_id'), init('object_id'));
     if (is_object($plan)) {
         ajax::success(utils::o2a($plan));
     }
     throw new Exception(__('Aucun plan correspondant'));
 }
 if (init('action') == 'remove') {
     $plan = plan::byId(init('id'));
     if (is_object($plan)) {
         ajax::success($plan->remove());
     }
     $plan = plan::byLinkTypeLinkIdPlanHedaerId(init('link_type'), init('link_id'), init('object_id'));
     if (is_object($plan)) {
         ajax::success($plan->remove());
     }
     throw new Exception(__('Aucun plan correspondant'));
 }
 if (init('action') == 'removePlanHeader') {
     if (!isConnect('admin')) {
         throw new Exception(__('401 - Accès non autorisé', __FILE__));
     }
     $planHeader = planHeader::byId(init('id'));
     if (!is_object($planHeader)) {
         throw new Exception(__('Objet inconnu verifié l\'id', __FILE__));
     }
     $planHeader->remove();
     ajax::success();
コード例 #6
0
ファイル: detail.php プロジェクト: RenzcPHP/3dproduct
 public function set_bonus($id, $page = 1)
 {
     /* 权限检查 订单列表 */
     role::check('order_list');
     if (empty($id)) {
         remind::set(Kohana::lang('o_global.bad_request'), 'order/ticketnum/');
     }
     $ticketobj = ticket::get_instance();
     $result = $ticketobj->get($id);
     if (empty($result)) {
         remind::set(Kohana::lang('o_global.bad_request'), 'order/ticketnum/');
     }
     //提交操作
     if (!empty($_POST)) {
         tool::filter_strip_tags($_POST);
         $bonus = $_POST['money'];
         $num = $_POST['num'];
         $password = $_POST['password'];
         $flag = $ticketobj->update_bonus($id, $bonus, $num, $password, $this->manager_id);
         $addchar = '成功';
         if (!$flag) {
             $addchar = '失败';
         }
         //添加日志
         $logs_data = array();
         $logs_data['manager_id'] = $this->manager_id;
         $logs_data['user_log_type'] = 28;
         $logs_data['ip'] = tool::get_long_ip();
         $logs_data['memo'] = "为id:{$result['id']}的彩票录入奖金:{$bonus}{$addchar}";
         ulog::instance()->add($logs_data);
         if ($flag) {
             remind::set("成功为id:{$result['id']}的彩票录入奖金:{$bonus}", '/order/ticketnum/index/hasticket/?page=' . $page, 'success');
         } else {
             remind::set("为id:{$result['id']}的彩票录入奖金:{$bonus}失败", '/order/ticketnum/?page=' . $page, 'error');
         }
     }
     if ($result['status'] != 1 && !($result['status'] == 2 && $result['bonus'] == -9999)) {
         remind::set(Kohana::lang('o_global.bad_request'), 'order/ticketnum/');
     }
     //获取更多信息
     $result['plan'] = plan::get_instance()->get_plan_by_tid($result['plan_id'], $result['ticket_type']);
     $result['user'] = user::get_instance()->get($result['plan']['user_id']);
     $result['manager'] = '';
     if (!empty($result['manager_id'])) {
         $manager = Mymanager::instance($result['manager_id'])->get();
         $result['manager'] = $manager['username'];
     }
     $this->template->content = new View("order/order_set_bonus", $result);
 }
コード例 #7
0
            }
            $first_replace = preg_replace("/<{text3_loopstart}>(.*?)<{text3_loopend}>/s", $titstr, $first_replace);
            $str .= preg_replace("/<{(.*?)}>/e", "\$\$1", $first_replace);
        }
        $returncontent = preg_replace("/<{skills_loopstart}>(.*?)<{skills_loopend}>/s", $str, $returncontent);
        $array["skill_id"] = $skills;
        //	$array["frist_name"]=$first_name;
        //	$array["last_name"]=$last_name;
        $array["type"] = $type;
        $array["user_id"] = $user_id;
        $array["username"] = $username;
        $returncontent = $common->direct_replace($db_object, $returncontent, $array);
        echo $returncontent;
    }
}
$obj = new plan();
if ($save) {
    $action = "save";
}
if ($submit) {
    $action = "approve";
}
if ($resubmit) {
    $action = "resubmit";
}
if ($preview) {
    $status = "preview";
}
switch ($action) {
    case NULL:
        $obj->preview($db_object, $common, $learning, $default, $user_id, $post_var, $gbl_freq_array, $status);
コード例 #8
0
ファイル: plans.php プロジェクト: xornob/fcc-signup
/**
 * Plans
 *
 * The template for displaying plans
 *
 * @author Matt Beall
 * @since 0.0.1
 */
global $the_title;
$the_title = 'Plans';
include_once 'header.php';
if (!is_logged_in() || $_SESSION['user_level'] < 100) {
    header('Location: http://fortcollinscreative.com/');
} else {
    $plan = plan::get_instance($_REQUEST['id']);
    ?>
<div class="content-area container" id="primary">
  <div class="row">
    <div class="site-content col-xs-12" id="content">
      <div class="row">
        <div class="col-xs-12 col-sm-12 hidden-md hidden-lg"></div>

        <article class="col-xs-12 post-1230 page type-page status-publish hentry" id="post-1230">
          <header class="entry-header">
            <h1 class="entry-title">We strive to develop excellent software that transforms data into relationships</h1>

            <div class="entry-meta"></div><!-- .entry-meta -->
          </header><!-- .entry-header -->

          <div class="entry-content">
コード例 #9
0
ファイル: _form.php プロジェクト: kachomanic/covan
/* @var $form yii\widgets\ActiveForm */
?>

<div class="carrera-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'nombreca')->textInput(['maxlength' => true]);
?>


    <?php 
echo $form->field($model, 'idPlan')->widget(Select2::classname(), ['data' => ArrayHelper::map(plan::find()->all(), 'idPlan', 'nombrep'), 'language' => 'en', 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]]);
?>

      <?php 
echo $form->field($model, 'idFacultad')->widget(Select2::classname(), ['data' => ArrayHelper::map(Facultad::find()->all(), 'idFacultad', 'nombref'), 'language' => 'en', 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Guardar' : 'Actualizar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
コード例 #10
0
ファイル: jeeNetwork.class.php プロジェクト: GaelGRIFFON/core
 public static function changeMode($_mode)
 {
     switch ($_mode) {
         case 'master':
             if (config::byKey('jeeNetwork::mode') != 'master') {
                 $cron = new cron();
                 $cron->setClass('history');
                 $cron->setFunction('historize');
                 $cron->setSchedule('*/5 * * * * *');
                 $cron->setTimeout(5);
                 $cron->save();
                 $cron = new cron();
                 $cron->setClass('scenario');
                 $cron->setFunction('check');
                 $cron->setSchedule('* * * * * *');
                 $cron->setTimeout(5);
                 $cron->save();
                 $cron = new cron();
                 $cron->setClass('cmd');
                 $cron->setFunction('collect');
                 $cron->setSchedule('*/5 * * * * *');
                 $cron->setTimeout(5);
                 $cron->save();
                 $cron = new cron();
                 $cron->setClass('history');
                 $cron->setFunction('archive');
                 $cron->setSchedule('00 * * * * *');
                 $cron->setTimeout(20);
                 $cron->save();
                 config::save('jeeNetwork::mode', 'master');
             }
             break;
         case 'slave':
             if (config::byKey('jeeNetwork::mode') != 'slave') {
                 foreach (eqLogic::all() as $eqLogic) {
                     $eqLogic->remove();
                 }
                 foreach (object::all() as $object) {
                     $object->remove();
                 }
                 foreach (update::all() as $update) {
                     switch ($update->getType()) {
                         case 'core':
                             break;
                         case 'plugin':
                             try {
                                 $plugin = plugin::byId($update->getLogicalId());
                                 if (is_object($plugin) && $plugin->getAllowRemote() != 1) {
                                     $update->deleteObjet();
                                 }
                             } catch (Exception $e) {
                             }
                             break;
                         default:
                             $update->deleteObjet();
                             break;
                     }
                 }
                 foreach (view::all() as $view) {
                     $view->remove();
                 }
                 foreach (plan::all() as $plan) {
                     $plan->remove();
                 }
                 foreach (scenario::all() as $scenario) {
                     $scenario->remove();
                 }
                 foreach (listener::all() as $listener) {
                     $listener->remove();
                 }
                 $cron = cron::byClassAndFunction('history', 'historize');
                 if (is_object($cron)) {
                     $cron->remove();
                 }
                 $cron = cron::byClassAndFunction('scenario', 'check');
                 if (is_object($cron)) {
                     $cron->remove();
                 }
                 $cron = cron::byClassAndFunction('cmd', 'collect');
                 if (is_object($cron)) {
                     $cron->remove();
                 }
                 $cron = cron::byClassAndFunction('history', 'archive');
                 if (is_object($cron)) {
                     $cron->remove();
                 }
                 $user = new user();
                 $user->setLogin('jeedom_master');
                 $user->setPassword(config::genKey(255));
                 $user->setRights('admin', 1);
                 $user->save();
                 config::save('jeeNetwork::mode', 'slave');
             }
             break;
     }
 }
コード例 #11
0
                $sql = "select position from {$user_table} where user_id in {$report}";
                $pos_rs = $db_object->get_single_column($sql);
                $pos = @implode(",", $pos_rs);
                $pos1 = "(" . $pos . ")";
                $plan_sql = "select plan_id from {$deployment_plan} where position in {$pos1}";
                $plan_res = $db_object->get_single_column($plan_sql);
                if ($plan_res[0] != "") {
                    $plan = @implode(",", $plan_res);
                    $plan = "(" . $plan . ")";
                    $sql = "select count({$position_designee1}.designated_user) from {$position_designee1},{$position_designee2}\n\n\twhere {$position_designee1}.plan_id={$position_designee2}.plan_id and {$position_designee1}.plan_id in {$plan}";
                    $count_res = $db_object->get_single_column($sql);
                    $count = $count_res[0];
                    if ($count > 0) {
                        $per = $count / count($direct_reports) * 100;
                    } else {
                        $per = 0;
                    }
                }
            } else {
                $per = 0;
            }
            $str .= preg_replace("/<{(.*?)}>/e", "\$\$1", $match);
        }
        $file = preg_replace("/<{boss_loopstart}>(.*?)<{boss_loopend}>/s", $str, $file);
        $file = $common->direct_replace($db_object, $file, $xArray);
        echo $file;
    }
}
$obj = new plan();
$obj->succession_plan($db_object, $common, $user_id, $gbl_date_format, $error_msg);
include_once "footer.php";