Esempio n. 1
0
 public function __construct()
 {
     parent::__construct();
     // Load the rest client spark
     $this->load->spark('restclient/2.0.0');
     // Run some setup
     $this->rest->initialize(array('server' => api_url()));
 }
Esempio n. 2
0
 /**
  * Post::__construct()
  * 
  * @return
  */
 public function __construct()
 {
     parent::__construct();
     // Load the rest client spark
     $this->load->spark('restclient/2.0.0');
     // Run some setup
     $this->rest->initialize(array('server' => api_url()));
     // load the pagination library
     $this->load->library('pagination');
     // $this->output->enable_profiler(TRUE);
 }
/**
 * Overrides api_preprocess_api_defined().
 */
function bootstrap_subtheme_preprocess_api_defined(&$variables)
{
    $object = $variables['object'];
    $branch = $variables['branch'];
    $variables['file_summary'] = '';
    $options = array('attributes' => array('data-anchor-ignore' => 'true'));
    if ($object->start_line) {
        $options['fragment'] = 'source.' . $object->start_line;
    }
    if ($file_info = api_object_load((int) $object->file_did, $branch, 'file')) {
        $options['attributes']['title'] = $file_info->summary;
    }
    $variables['file_link'] = str_replace('/', '/<wbr>', dirname($object->file_name)) . '/<wbr>' . l(basename($object->file_name), api_url($object, TRUE), $options);
    if ($object->start_line) {
        $variables['file_link'] = t('!file (line @start_line)', array('!file' => $variables['file_link'], '@start_line' => $object->start_line));
    }
}
Esempio n. 4
0
 function submit()
 {
     $notify_url = $this->baseurl . "payment/chinpay/notify_url.php";
     if ($_SESSION['user_id']) {
         $return_url = $GLOBALS['app']->url('payment', 'notice', 'id=' . $this->order['id'], 'www', true);
         $show_url = $GLOBALS['app']->url('order', 'info', 'id=' . $this->order['id'], 'www', true);
     } else {
         $return_url = $GLOBALS['app']->url('payment', 'notice', 'sn=' . $this->order['sn'] . '&passwd=' . $this->order['passwd'], 'www', true);
         $show_url = $GLOBALS['app']->url('order', 'info', 'sn=' . $this->order['sn'] . '&passwd=' . $this->order['passwd']);
     }
     $return_url = api_url('payment', 'notice', 'id=' . $this->order['id'], true);
     $currency_id = $this->param['currency'] ? $this->param['currency']['id'] : $this->order['currency_id'];
     $total_fee = price_format_val($this->order['price'], $this->order['currency_id'], $currency_id);
     $debug = $this->param['param']['env'] == 'start' ? false : true;
     $chinapay = new chinapay_lib($this->dir_root);
     $chinapay->set_debug($debug);
     $chinapay->set_pid($this->param['param']['pid']);
     $chinapay->set_pri_key($this->param['param']['prikey']);
     $chinapay->set_pub_key($this->param['param']['pubkey']);
     $chinapay->set_orderid($this->order['id']);
     $options = array('notify_url' => $notify_url, 'return_url' => $return_url, 'bankid' => $bankid, 'price' => $total_fee);
     $options['show_url'] = $show_url;
     $options['currency'] = $this->param['currency']['code'];
     $options['date'] = date("Ymd", $GLOBALS['app']->time);
     $options['passwd'] = $this->order['sn'];
     $chinapay->set_options($options);
     $info = $chinapay->action_form('paymentsubmit');
     if (!$info) {
         error(P_Lang('银行支付接口异常,数据未正常配置'), '', 'error');
     }
     //建立请求
     echo '<!DOCTYPE html>' . "\n";
     echo '<html>' . "\n";
     echo '<head>' . "\n\t";
     echo '<meta charset="utf-8" />' . "\n\t";
     echo '<title>付款中</title>' . "\n";
     echo '</head>' . "\n<body>\n";
     echo $info;
     echo '<script type="text/javascript">document.getElementById("paymentsubmit").submit()</script>';
     echo "\n" . '</body>' . "\n</html>";
     exit;
 }
Esempio n. 5
0
<?php

if (!is_admin()) {
    return;
}
$save_url = site_url('module?type=settings___template');
$save_url = api_url('current_template_save_custom_css');
$tpl_settings_for_theme = THIS_TEMPLATE_DIR . 'template_settings.php';
if (!is_file($tpl_settings_for_theme)) {
    return;
}
$active_template_dir = THIS_TEMPLATE_FOLDER_NAME;
if (isset($_POST['save_template_settings'])) {
    $css = "";
    if (isset($_POST['save_template_settings'])) {
        unset($_POST['save_template_settings']);
    }
    if (isset($_POST['module'])) {
        unset($_POST['module']);
    }
    if (isset($_POST['type'])) {
        unset($_POST['type']);
    }
    $live_edit_css_save_all = array();
    foreach ($_POST as $a => $b) {
        if (isset($b['selector'])) {
            $props = explode(',', $b['property']);
            $curr = "";
            foreach ($props as $prop) {
                $curr .= $prop . ":" . $b['value'] . ";";
            }
Esempio n. 6
0
                        <div class="row">
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                Thông tin giảng viên
                            </div>
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
                                <a href="<?php 
echo logged_url('lecturers');
?>
" class="btn btn-sm btn-primary">Danh sách giảng viên</a>
                            </div>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <form action="<?php 
echo api_url('lecturers/add');
?>
" method="post" accept-charset="utf-8" role="form">
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2">
                                        Tài khoản:
                                    </label>
                                    <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4">
                                        <select name="userid" class="form-control" required="required">
                                            <option value="">Chọn người dùng</option>
                                            <?php 
foreach ($users as $user) {
    ?>
                                                <option value="<?php 
    echo $user->id;
Esempio n. 7
0
                        <div class="row">
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                Thông tin sinh viên
                            </div>
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
                                <a href="<?php 
echo logged_url('student');
?>
" class="btn btn-sm btn-primary">Danh sách sinh viên</a>
                            </div>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <form action="<?php 
echo api_url('student/add');
?>
" method="post" accept-charset="utf-8" role="form">
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2">
                                        Mã sinh viên:
                                    </label>
                                    <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4">
                                        <input type="number" name="mssv" class="form-control" value="" required="required" placeholder="Nhập mã sinh viên">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2">
Esempio n. 8
0
                        <div class="row">
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                Phân công thực tập
                            </div>
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
                                <a href="<?php 
echo logged_url('assigning_practice');
?>
" class="btn btn-sm btn-primary">Công việc đã phân công</a>
                            </div>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <form action="<?php 
echo api_url('assigning_practice/edit');
?>
" method="post" accept-charset="utf-8" role="form">
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-3">
                                        Sinh viên:
                                    </label>
                                    <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4">
                                        <select name="student_id" class="form-control" required="required">
                                            <option value="">Chọn sinh viên</option>
                                            <?php 
foreach ($students as $student) {
    ?>
                                                <option <?php 
    echo $student->id == $assigned->student_id ? 'selected="selected"' : '';
Esempio n. 9
0
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                Danh sách lớp
                            </div>
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
                                <a class="btn btn-sm btn-primary" href="<?php 
echo logged_url('classes/add');
?>
">Thêm mới</a>
                            </div>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <div class="dataTable_wrapper">
                            <table class="table table-striped table-bordered table-hover" id="dataTables" data-url-process-delete="<?php 
echo api_url('classes/delete');
?>
">
                                <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>Lớp</th>
                                        <th>Ngành</th>
                                        <th>Quản lý</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php 
foreach ($classes as $class) {
    ?>
                                    <tr>
Esempio n. 10
0
</span></td>
        <td><span class="mw-date"><?php 
        print file_size_nice($item['size']);
        ?>
</span></td>
        <td class="mw-backup-download"><a class="show-on-hover mw-ui-btn tip mw-ui-btn-icon mw-ui-btn-<?php 
        print $extension == 'sql' ? 'warn' : 'notification';
        ?>
" data-tip="<?php 
        print $tip;
        ?>
" data-tipposition="top-center" target="_blank" title="<?php 
        _e("Download");
        ?>
" href="<?php 
        print api_url('Microweber/Utils/Backup/download');
        ?>
?file=<?php 
        print $item['filename'];
        ?>
"><span class="mw-icon-download"></span></a></td>
        <td class="mw-backup-restore"><a title="<?php 
        _e("Restore");
        ?>
" class="show-on-hover mw-icon-reload" href="javascript:mw.admin_backup.restore('<?php 
        print $item['filename'];
        ?>
','#restore-<?php 
        print md5($item['filename']);
        ?>
')"></a></td>
Esempio n. 11
0
        ?>
          <a href="javascript:;" onmousedown="mw.contactForm();" class="mw-ui-btn">
          <?php 
        _e("Support");
        ?>
          </a>
          <?php 
    }
    ?>

            <a href="<?php 
    print site_url();
    ?>
?editmode=y" class="mw-ui-btn go-live-edit-href-set">
          <?php 
    _e("View Website");
    ?>
          </a> <a href="<?php 
    print api_url('logout');
    ?>
" class="mw-ui-btn">
          <?php 
    _e("Log out");
    ?>
          </a> </div>
      </div>
            </div>
  </div>
        </div>
<?php 
}
Esempio n. 12
0
 /**
  * Returns an array of Art Work fields, for JSON serialization
  *
  * @return array
  */
 public function jsonFields()
 {
     return ['url' => $this->url(), 'link' => api_url($this->uri()), 'title' => $this->title()->html()->toString(), 'description' => $this->text()->kirbytext()->toString()];
 }
Esempio n. 13
0
            mw.load_module('shop/orders/edit_order','#mw-admin-edit-order', function(){
                Rotator.go(1);
            });
      	 }
      }

});

function mw_delete_shop_order(pid, iscart){
     var iscart = iscart || false;
     mw.tools.confirm("<?php 
_e("Are you sure you want to delete this order");
?>
?", function(){
        $.post("<?php 
print api_url('delete_order');
?>
", { id: pid,is_cart:iscart}, function(data) {
            mw.reload_module('shop/orders');
        });
     });
}
</script>
<?php 
mw()->notifications_manager->mark_as_read('shop');
?>
<div class="admin-section-container">
  <div class="mw-simple-rotator">
      <div class="mw-simple-rotator-container" id="orders-rotator">
        <module type="shop/orders/manage"  id="mw-admin-manage-orders"  />
        <div id="mw-admin-edit-order"></div>
Esempio n. 14
0
 public function socialite_config($provider = false)
 {
     $callback_url = api_url('social_login_process?provider=' . $provider);
     if (get_option('enable_user_fb_registration', 'users') == 'y') {
         Config::set('services.facebook.client_id', get_option('fb_app_id', 'users'));
         Config::set('services.facebook.client_secret', get_option('fb_app_secret', 'users'));
         Config::set('services.facebook.redirect', $callback_url);
     }
     if (get_option('enable_user_twitter_registration', 'users') == 'y') {
         Config::set('services.twitter.client_id', get_option('twitter_app_id', 'users'));
         Config::set('services.twitter.client_secret', get_option('twitter_app_secret', 'users'));
         Config::set('services.twitter.redirect', $callback_url);
     }
     if (get_option('enable_user_google_registration', 'users') == 'y') {
         Config::set('services.google.client_id', get_option('google_app_id', 'users'));
         Config::set('services.google.client_secret', get_option('google_app_secret', 'users'));
         Config::set('services.google.redirect', $callback_url);
     }
     if (get_option('enable_user_github_registration', 'users') == 'y') {
         Config::set('services.github.client_id', get_option('github_app_id', 'users'));
         Config::set('services.github.client_secret', get_option('github_app_secret', 'users'));
         Config::set('services.github.redirect', $callback_url);
     }
     if (get_option('enable_user_linkedin_registration', 'users') == 'y') {
         Config::set('services.linkedin.client_id', get_option('linkedin_app_id', 'users'));
         Config::set('services.linkedin.client_secret', get_option('linkedin_app_secret', 'users'));
         Config::set('services.linkedin.redirect', $callback_url);
     }
     if (get_option('enable_user_microweber_registration', 'users') == 'y') {
         $svc = Config::get('services.microweber');
         if (!isset($svc['client_id'])) {
             Config::set('services.microweber.client_id', get_option('microweber_app_id', 'users'));
         }
         if (!isset($svc['client_secret'])) {
             Config::set('services.microweber.client_secret', get_option('microweber_app_secret', 'users'));
         }
         if (!isset($svc['redirect'])) {
             Config::set('services.microweber.redirect', $callback_url);
         }
         $this->socialite->extend('microweber', function ($app) {
             $config = $app['config']['services.microweber'];
             return $this->socialite->buildProvider('\\Microweber\\Providers\\Socialite\\MicroweberProvider', $config);
         });
     }
 }
Esempio n. 15
0
 function submit()
 {
     $tenpay = new tenpay_lib();
     $tenpay->set_key($this->param['param']['key']);
     $tenpay->set_biz($this->param['param']['pid']);
     $tenpay->set_email($this->param['param']['email']);
     $tenpay->set_url('https://gw.tenpay.com/gateway/pay.htm');
     $notify_url = $this->baseurl . "payment/tenpay/notify_url.php";
     //同步通知网址
     if ($_SESSION['user_id']) {
         $return_url = $GLOBALS['app']->url('payment', 'notice', 'id=' . $this->order['id'], 'www', true);
     } else {
         $return_url = $GLOBALS['app']->url('payment', 'notice', 'sn=' . $this->order['sn'] . '&passwd=' . $this->order['passwd'], 'www', true);
     }
     $return_url = api_url('payment', 'notice', 'id=' . $this->order['id'], true);
     //付款金额
     $currency_id = $this->param['currency'] ? $this->param['currency']['id'] : $this->order['currency_id'];
     $total_fee = price_format_val($this->order['price'], $this->order['currency_id'], $currency_id);
     /************************************************************/
     //商户编号
     $desc = 'SN:' . $this->order['sn'];
     $tenpay->param('partner', $this->param['param']['pid']);
     $tenpay->param("out_trade_no", $this->order['sn']);
     $tenpay->param("total_fee", $total_fee * 100);
     //总金额
     $tenpay->param("return_url", $return_url);
     $tenpay->param("notify_url", $notify_url);
     $tenpay->param("body", $desc);
     //银行类型
     if ($this->param['param']['bank']) {
         $tenpay->param("bank_type", trim(strtoupper($this->param['param']['bank'])));
     } else {
         $tenpay->param("bank_type", "DEFAULT");
     }
     //用户ip
     $tenpay->param("spbill_create_ip", $GLOBALS['app']->lib('common')->ip());
     //客户端IP
     $tenpay->param("fee_type", "1");
     //币种
     $tenpay->param("subject", $desc);
     //商品名称,(中介交易时必填)
     //系统可选参数
     $tenpay->param("sign_type", "MD5");
     //签名方式,默认为MD5,可选RSA
     $tenpay->param("service_version", "1.0");
     //接口版本号
     $tenpay->param("input_charset", "utf-8");
     //字符集
     $tenpay->param("sign_key_index", "1");
     //密钥序号
     //业务可选参数
     $ptype = $this->param['param']['ptype'] == 'create_direct_pay_by_user' ? 1 : 2;
     $tenpay->param("attach", $this->order['passwd']);
     //附件数据,原样返回就可以了
     $tenpay->param("product_fee", "");
     //商品手续费用
     $tenpay->param("transport_fee", "0");
     //物流费用
     $tenpay->param("time_start", date("YmdHis", $this->time));
     //订单生成时间
     $tenpay->param("time_expire", "");
     //订单失效时间
     $tenpay->param("buyer_id", "");
     //买方财付通帐号
     $tenpay->param("goods_tag", "");
     //商品标记
     $tenpay->param("trade_mode", $ptype);
     //交易模式(1.即时到帐模式,2.中介担保模式,3.后台选择(卖家进入支付中心列表选择))
     $tenpay->param("transport_desc", "");
     //物流说明
     $tenpay->param("trans_type", "1");
     //交易类型
     $tenpay->param("agentid", "");
     //平台ID
     $tenpay->param("agent_type", 0);
     //代理模式(0.无代理,1.表示卡易售模式,2.表示网店模式)
     $tenpay->param("seller_id", "");
     //卖家的商户号
     $url = $tenpay->url();
     header("Location:" . $url);
     exit;
 }
Esempio n. 16
0
				var selected = [];
				$('#<?php 
print $params['id'];
?>
 .enabled_custom_fonts_table input:checked').each(function() {
					selected.push($(this).val());
				});

		 		window.parent.mw.wysiwyg.fontFamiliesExtended = [];
				window.parent.mw.wysiwyg.initExtendedFontFamilies(selected);
				window.parent.mw.wysiwyg.initFontSelectorBox();	
				
				var custom_fonts_stylesheet = window.parent.document.getElementById("mw-custom-user-css");
				if(custom_fonts_stylesheet != null){
					var custom_fonts_stylesheet_restyled = '<?php 
print api_url('template/print_custom_css');
?>
?v='+Math.random(0,10000);
					custom_fonts_stylesheet.href = custom_fonts_stylesheet_restyled;

				}
				
			}
		
        });
		
		
		$('#<?php 
print $params['id'];
?>
 .enabled_custom_fonts_table input:checked').each(function() {
Esempio n. 17
0
                        <div class="row">
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                Phân công thực tập
                            </div>
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
                                <a href="<?php 
echo logged_url('assigning_practice');
?>
" class="btn btn-sm btn-primary">Công việc đã phân công</a>
                            </div>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <form action="<?php 
echo api_url('assigning_practice/add');
?>
" method="post" accept-charset="utf-8" role="form">
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-3">
                                        Sinh viên:
                                    </label>
                                    <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4">
                                        <select name="student_id" class="form-control" required="required">
                                            <option value="">Chọn sinh viên</option>
                                            <?php 
foreach ($students as $student) {
    ?>
                                                <option value="<?php 
    echo $student->id;
Esempio n. 18
0
    ?>
                                    <a class="btn btn-sm btn-primary" href="<?php 
    echo logged_url('companies/add');
    ?>
">Thêm mới</a>
                                <?php 
}
?>
                            </div>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <div class="dataTable_wrapper">
                            <table class="table table-striped table-bordered table-hover" id="dataTables" data-url-process-delete="<?php 
echo api_url('companies/delete');
?>
">
                                <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>Tên công ty</th>
                                        <th>Địa chỉ</th>
                                        <th>Người quản lý</th>
                                        <?php 
if (is_admin()) {
    ?>
                                        <th>Quản lý</th>
                                        <?php 
}
?>
Esempio n. 19
0
function phpok_call_api_url($phpok, $param = '', $tpl = '')
{
    if (!$phpok || !$GLOBALS['app']->site['api_code']) {
        return false;
    }
    $ext = $tpl ? 'tpl=' . rawurlencode($tpl) : '';
    $info = array('id' => $phpok, 'param' => $param);
    $token = $GLOBALS['app']->lib('token')->encode($info);
    if ($ext) {
        $ext .= "&";
    }
    $ext .= "token=" . rawurlencode($token);
    return api_url('index', 'phpok', $ext, true);
}
Esempio n. 20
0
        ?>
</td>
          <td><span class="mw-date"><?php 
        print $item['date'];
        ?>
</span></td>
          <td><span class="mw-date"><?php 
        print $item['time'];
        ?>
</span></td>
          <td><span class="mw-date"><?php 
        print file_size_nice($item['size']);
        ?>
</span></td>
          <td><a class="show-on-hover mw-ui-btn mw-ui-btn-blue" target="_blank" href="<?php 
        print api_url('Microweber/Utils/Import/download');
        ?>
?file=<?php 
        print $item['filename'];
        ?>
"><?php 
        _e("Download");
        ?>
</a></td>
        <td>
        <!--<a class="show-on-hover mw-ui-btn mw-ui-btn-green" href="javascript:mw.admin_import.restore('<?php 
        print $item['filename'];
        ?>
')"><?php 
        _e("Restore");
        ?>
Esempio n. 21
0
                        <div class="row">
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                Thông tin ngành
                            </div>
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
                                <a href="<?php 
echo logged_url('department');
?>
" class="btn btn-sm btn-primary">Danh sách ngành</a>
                            </div>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <form action="<?php 
echo api_url('department/edit');
?>
" method="post" accept-charset="utf-8" role="form">
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2">
                                        Tên ngành:
                                    </label>
                                    <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4">
                                        <input type="text" name="name" class="form-control" value="<?php 
echo $department->name;
?>
" required="required" placeholder="Nhập tên ngành">
                                    </div>
                                </div>
                            </div>
Esempio n. 22
0
    $custom_user_fields = mw()->modules->ui('mw.admin.user.edit.fields');
    ?>

 
<script  type="text/javascript">

DeleteUserAdmin<?php 
    print $data['id'];
    ?>
 = function($user_id){
	
	 
	var r = confirm("Are you sure you want to delete this user?");
	if (r == true) {
		 $.post( "<?php 
    print api_url('delete_user');
    ?>
", { id: $user_id })
		  .done(function( data ) {
			    mw.reload_module('[data-type="users/manage"]', function(){
					mw.hash('#sortby=created_at desc');
					mw.notification.success('User deleted');
					 
				  
				 });
		  });
	} 
}


SaveAdminUserForm<?php 
Esempio n. 23
0
<?php

include __DIR__ . DS . 'header.php';
?>
<h2>
	<a href="<?php 
echo api_url();
?>
user_social_login?provider=microweber">
		Use your Microweber account
	</a>
</h2>
<h3>or create a local account</h3>
<form action="<?php 
echo admin_url('mw_install_create_user');
?>
" method="post">
	<div>
		<div class="label">Username</div>
		<input name="admin_username" />
	</div>
	<div>
		<div class="label">Email</div>
		<input name="admin_email" />
	</div>
	<div>
		<div class="label">Password</div>
		<input name="admin_password" type="password" />
	</div>
	<div>
		<input type="submit" value="Create Account" />
Esempio n. 24
0
                        <div class="row">
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                Thông tin công ty
                            </div>
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
                                <a href="<?php 
echo logged_url('companies');
?>
" class="btn btn-sm btn-primary">Danh sách công ty</a>
                            </div>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <form action="<?php 
echo api_url('companies/add');
?>
" method="post" accept-charset="utf-8" role="form">
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2">
                                        Tên công ty:
                                    </label>
                                    <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4">
                                        <input type="text" name="name" class="form-control" value="" required="required" placeholder="Nhập tên công ty">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2">
Esempio n. 25
0
            <div class="col-lg-12">
                <h1 class="page-header"><?php 
echo $title;
?>
</h1>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        Nội dung
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <?php 
if (count($regs) == 0) {
    ?>
                            <form action="<?php 
    echo api_url('register_internship/add');
    ?>
" method="post" accept-charset="utf-8" role="form" enctype="multipart/form-data">
                                <div class="form-group">
                                    <div class="row">
                                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-3">
                                            Phiếu đăng ký thực tập:
                                        </label>
                                        <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4">
                                            <input type="file" name="attachment" class="form-control" value="" required="required">
                                            <i class="help-block">Hỗ trợ các tập tin: (doc,docx,pdf,xlsx,xls,ppt,pptx)</i>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="row">
function topics($company_sfnid, $options)
{
    if (!singleton(array($options['product'], $options['tag'], $options['query'], $options['person'], $options['followed'], $options['related']))) {
        throw new Exception('topics($options) got more than one of these options: ' . 'product, tag, query, person, followed, or related.');
    }
    if ($options['product']) {
        $url_path = is_http_url($options['product']) ? $options['product'] . "/topics" : ($url_path = 'products/' . $options['product'] . '/topics');
    } else {
        if ($options['tag']) {
            $options['tag'] = preg_replace('/ /', '_', $options['tag']);
            $url_path = 'companies/' . $company_sfnid . '/tags/' . $options['tag'] . '/topics';
        } else {
            if ($options['person']) {
                $url_path = 'people/' . $options['person'] . '/topics';
            } else {
                if ($options['followed']) {
                    $url_path = 'people/' . $options['followed'] . '/followed/topics';
                } else {
                    if ($options['related']) {
                        $related_to_id = $options['related'];
                        $related_to_id = preg_replace('/\\?.*/', '', $related_to_id);
                        # FIXME
                        $url_path = $related_to_id . '/related';
                    } else {
                        $url_path = 'companies/' . $company_sfnid . '/topics';
                        if ($options['query']) {
                            $url_path .= '?query=' . urlencode($options['query']);
                        }
                    }
                }
            }
        }
    }
    # The above options determine an "unfiltered" feed, which is then filtered
    # by topic style or some other criteria, such as the "unanswered" property.
    # The unfiltered feed has information that we need, though (particularly
    # the topic totals by style, which should not be filtered to one particular
    # style). Thus we note the URL determined by the above options, before
    # choosing the filtered URL.
    $unfiltered_feed_url = api_url($url_path);
    $extra_params = "";
    if ($options['style']) {
        if ($options['style'] == 'unanswered') {
            $extra_params .= '&sort=unanswered';
        } else {
            $extra_params .= '&style=' . $options['style'];
        }
    }
    if ($options['frequently_asked']) {
        $extra_params .= '&sort=most_me_toos';
    }
    if ($options['page']) {
        $extra_params .= '&page=' . $options['page'];
    }
    if ($options['limit']) {
        $extra_params .= '&limit=' . $options['limit'];
    }
    if ($options['sort']) {
        $extra_params .= '&sort=' . $options['sort'];
    }
    if ($extra_params) {
        if (preg_match('/\\?/', $url_path)) {
            $url_path .= $extra_params;
        } else {
            $url_path .= '?' . $extra_params;
        }
    }
    $topics_feed_url = api_url($url_path);
    # == FETCH THE FEED ==
    # Atom feeds at Get Satisfaction are divided into pages; each page
    # contains a link/@rel="next" element at the top which points to the
    # next page. We loop, collecting these pages, until we have as many
    # entries as $at_least, or run out of pages.
    $topics = array();
    $topics_feed_page_str = get_url($topics_feed_url, false);
    assert(!!$topics_feed_page_str);
    try {
        $topics_feed = new XML_Feed_Parser($topics_feed_page_str);
    } catch (XML_Feed_Parser_Exception $e) {
        invalidate_http_cache($topics_feed_page_url);
        throw new Exception("Get Satisfaction feed at {$topics_feed_page_url} not valid: " . $e->getMessage());
    }
    foreach ($topics_feed as $entry) {
        $topic = fix_atom_entry($entry, 'topic');
        array_push($topics, $topic);
    }
    $totals = topic_totals($topics_feed);
    $totals['this'] = feed_total($topics_feed);
    return array('topics' => $topics, 'totals' => $totals);
}
Esempio n. 27
0
                        <div class="row">
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                Nhập chi tiết báo cáo
                            </div>
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
                                <a href="<?php 
echo logged_url('practice_report');
?>
" class="btn btn-sm btn-primary">Báo cáo</a>
                            </div>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <form action="<?php 
echo api_url('practice_report/edit');
?>
" method="post" accept-charset="utf-8" role="form" enctype="multipart/form-data">
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2">
                                        Tiêu đề:
                                    </label>
                                    <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4">
                                        <input type="text" name="pr_title" class="form-control" value="<?php 
echo $report->pr_title;
?>
" required="required" placeholder="Nhập tiêu đề">
                                    </div>
                                </div>
                            </div>
Esempio n. 28
0
        saveuserdata = function(){
            var data = mw.serializeFields('#user-data');
            if(data.password != data.password2){
                mw.$('#errnotification').html('Passwords do not match').show();
                return false;
            }
            else{
                mw.$('#errnotification').hide();
                if(data.password == ''){
                  delete data.password;
                  delete data.password2;
                }
            }
            mw.tools.loading('#user-data')
           $.post("<?php 
print api_url();
?>
save_user", data, function(){
                mw.tools.loading('#user-data', false);
           });
        }

    </script>
     <style>

     .profile-box > .mw-ui-row{
       margin-bottom: 24px;
     }

     </style>
Esempio n. 29
0
 /**
  * Returns an array of Studio fields, for JSON serialization
  *
  * @return array
  */
 public function jsonFields()
 {
     return ['url' => $this->url(), 'link' => api_url($this->uri()), 'title' => $this->title()->html()->toString(), 'phone' => $this->phone()->toString(), 'email' => $this->email()->toString()];
 }
Esempio n. 30
0
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                Danh sách thành viên
                            </div>
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
                                <a href="<?php 
echo logged_url('user/add');
?>
" class="btn btn-sm btn-primary">Thêm mới</a>
                            </div>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <div class="dataTable_wrapper">
                            <table class="table table-striped table-bordered table-hover" id="dataTables" data-url-process-delete="<?php 
echo api_url('user/delete');
?>
">
                                <thead>
                                    <tr>
                                        <th>Tên người dùng</th>
                                        <th>Họ tên</th>
                                        <th>Email</th>
                                        <th>Nhóm</th>
                                        <th>Khoa</th>
                                        <th>Trạng thái</th>
                                        <th>Quản lý</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php