Commit bce3af96 authored by Anthony.Suerte's avatar Anthony.Suerte

Advertisement Uploader Enhancement

parent 4991c92a
......@@ -58,6 +58,7 @@ include_once('template/base_head.php');
<table class="table col bdr default odd w100p fontXS calign">
<th>Thumbnail</th>
<th>Ad ID</th>
<th>File Name</th>
<th>Created By</th>
<th>Created Date</th>
<th>Info</th>
......
......@@ -29,7 +29,7 @@ include_once('template/base_head.php');
<div class="container-fluid">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-6" >
<img src="https://test.iwl.world/documents/ads/<?php $this -> echoFileName(); ?>" style="margin-left: auto;margin-right: auto; display: block;" alt="Cinque Terre" width="800" class="img-fluid">
<img src="<?=SITE_PROTOCOL?>://<?=SITE_DOMAIN_FULL?>/documents/ads/<?php $this -> echoFileName(); ?>" style="margin-left: auto;margin-right: auto; display: block;" alt="Cinque Terre" width="800" class="img-fluid">
<label for="img1">Change Image:</label>
<input type="file" accept="image/jpeg,image/png,image/jpg,image/gif,application/pdf" id="img1" name="img1" value="" class="w100p">
</div>
......@@ -95,13 +95,5 @@ include_once('template/base_head.php');
$("#sortable").disableSelection();
} );
</script>
<script>
$( function() {
$("#save").click({
<?php echo "alert('mikko');"; ?>
});
});
</script>
</body>
</html>
......@@ -124,7 +124,7 @@ function actionSearch() {
function deleteAd(id) {
var x = confirm("Are you sure you to delete this ad?");
var x = confirm("Are you sure you to delete this ad? "+'['+id+']');
if(x == true){
$('#type').val('delete');
$('#adID').val(id);
......
......@@ -130,7 +130,7 @@ $(function() {
})
//
$('#header_datetime').datetimepicker({
$('#header_datetime').datepicker({
format : 'Y-m-d H'
// , inline : true
......
......@@ -115,28 +115,6 @@ define('CARD_MESSAGE_ID', '13'); // シーケンスキー情報(カードA
define('API_SIGNATURE', '14'); // シーケンスキー情報(APIシグネチャ)
define('SQ_EXCHANGE_FEE', '15'); // シーケンスキー情報(為替手数料)
//-----------------------------------------------------------------------//
// 共通情報
//-----------------------------------------------------------------------//
define('SITE_NAME', 'iWallet');
define('SITE_SHORT_NAME', 'iWallet');
define('SITE_CORP_SHORT_NAME', 'iWallet');
define('CORPORATE_NAME', 'iWallet');
define('CORPORATE_ADDRESS', 'iWallet');
define('CORPORATE_REG_NO', 'iWallet');
define('CORPORATE_COUNTRY', '【※企業様国名 &lsquo;Merchant&rsquo; Country※】');
define('SITE_DOMAIN', 'iwl.world');
define('SITE_DOMAIN_0', 'iwl.world');
define('SITE_DOMAIN_1', 'd-wallet.biz');
define('SITE_SUB_DOMAIN', 'secure');
define('VAR_EC_MAIL_ADDRESS', 'infos@' . SITE_DOMAIN);
define('VAR_CS_MAIL_ADDRESS', 'cs@' . SITE_DOMAIN);
define('VAR_BS_MAIL_ADDRESS', 'bs@' . SITE_DOMAIN);
define('VAR_NOTICE_MAIL_ADDRESS', 'notice@' . SITE_DOMAIN);
define('VAR_MARCHANT_MAIL_ADDRESS', 'marchant@' . SITE_DOMAIN);
define('VAR_CARD_MAIL_ADDRESS', 'card@' . SITE_DOMAIN);
define('VAR_MARCHANT_ACCOUNT_NUMBER', '100000');
//-----------------------------------------------------------------------//
// カード関連
//-----------------------------------------------------------------------//
......
......@@ -4,6 +4,7 @@
//-----------------------------------------------------------------------//
$root = explode('/', $_SERVER['REQUEST_URI']);
require_once(LIBRARIES_CORE . 'site_keys.php'); // SITE Literals
require_once(LIBRARIES_CORE . 'primary_lits.php'); // Mango Primary Literals
require_once(LIBRARIES_CORE . 'column_keys.php'); // DBカラム名群
require_once(LIBRARIES_CORE . 'control_keys.php'); // コントロールキー群
......
<?php
//-----------------------------------------------------------------------//
// 共通情報
//-----------------------------------------------------------------------//
define('SITE_NAME', 'iWallet');
define('SITE_SHORT_NAME', 'iWallet');
define('SITE_CORP_SHORT_NAME', 'iWallet');
define('CORPORATE_NAME', 'iWallet');
define('CORPORATE_ADDRESS', 'iWallet');
define('CORPORATE_REG_NO', 'iWallet');
define('CORPORATE_COUNTRY', '【※企業様国名 &lsquo;Merchant&rsquo; Country※】');
define('SITE_PROTOCOL', 'https');
define('SITE_DOMAIN_FULL', 'secure.iwl.world');
define('SITE_DOMAIN', 'iwl.world');
define('SITE_DOMAIN_0', 'iwl.world');
define('SITE_DOMAIN_1', 'd-wallet.biz');
define('SITE_SUB_DOMAIN', 'secure');
define('VAR_EC_MAIL_ADDRESS', 'infos@' . SITE_DOMAIN);
define('VAR_CS_MAIL_ADDRESS', 'cs@' . SITE_DOMAIN);
define('VAR_BS_MAIL_ADDRESS', 'bs@' . SITE_DOMAIN);
define('VAR_NOTICE_MAIL_ADDRESS', 'notice@' . SITE_DOMAIN);
define('VAR_MARCHANT_MAIL_ADDRESS', 'marchant@' . SITE_DOMAIN);
define('VAR_CARD_MAIL_ADDRESS', 'card@' . SITE_DOMAIN);
define('VAR_MARCHANT_ACCOUNT_NUMBER', '100000');
\ No newline at end of file
......@@ -71,7 +71,7 @@ class LogicAdvertisements extends AdvertisementModelClass {
$this -> accessModify('INSERT_ADS', $this -> getImageAdRegistData());
$this -> popUpSessionMessage(INFO, 'I_COMPLATE_SAVE', array());
}else{
$this -> popUpSessionMessage(ERROR, 'E_ERROR_UPLOAD_ADMIN_INVALID', array());
$this -> popUpSessionMessage(ERROR, 'E_ERROR_UPLOAD_ADMIN_FAILED', array());
}
}
......
......@@ -361,7 +361,10 @@ class AdvertisementModelClass extends ModelClassEx {
else
chmod($path, 0777);
$this -> saveName = basename($_FILES[PARAM_IMG1][PARAM_NAME]);
$extName = basename($_FILES[PARAM_IMG1][PARAM_NAME]);
$extName = substr($extName, strpos($extName, "."));
$this -> saveName = "ad_{$this -> language}_{$this -> createUId()}.{$extName}";
// 画像の移動
if(move_uploaded_file($_FILES[PARAM_IMG1][PARAM_TMP_NAME], $path . DELIMIT_SLASH . $this -> saveName)) {
......@@ -421,36 +424,30 @@ class AdvertisementModelClass extends ModelClassEx {
if($this -> isLoopData($this -> rs2)) {
for($cnt = 0; $cnt < count($this -> rs2); $cnt++) {
$row = $this -> getRowData($this -> rs2, $cnt);
// $rtn .=
// '<li class="list-group-item h5" id='.$this -> getColumnData($row, 'id').'>'.
// '<img src="http://iwl.localhost/documents/ads/'.$this -> getColumnData($row, 'file_name').'" class="img-thumbnail" alt="Cinque Terre" width="70">'.
// '<p class="ml-3 mt-3">'.$this -> getColumnData($row, 'ads_id').'</p>'.
// '<span id="'.$this -> getColumnData($row, 'id').'" class="fa fa-info-circle fa-lg mr-5" style="color: #0275d8; position: absolute; right: 0;"></span>'.
// '<span onclick="deleteAd(\''.$this -> getColumnData($row, 'id').'\')" class="fa fa-trash fa-lg mr-2" style="color: #0275d8; position: absolute; right: 0;"></span>'.
// '</li>';
$rtn .= '<tr id='.$this -> getColumnData($row, 'id').' >'.
'<td>'.
'<img src="https://'.SITE_DOMAIN.'/documents/ads/'.$this -> getColumnData($row, 'file_name').'" class="img-thumbnail" alt="Cinque Terre" width="70">'.
'</td>'.
'<td>'.
'<p class="ml-3 mt-3">'.$this -> getColumnData($row, 'ads_id').'</p>'.
'</td>'.
'<td>'.
'<p class="ml-3 mt-3">'. $this -> getAdminNameByUid($this -> getColumnData($row, 'created_by')).'</p>'.
'</td>'.
'<td>'.
'<p class="ml-3 mt-3">'.$this -> getColumnData($row, 'create_time').'</p>'.
'</td>'.
'<td class="blocka">'.
'<a href="#"><span id="'.$this -> getColumnData($row, 'id').'" class="fa fa-info-circle fa-lg ml-3 mt-3" style="color: #0275d8;"></span></a>'.
'</td>'.
'<td class="blocka">'.
'<a href="#"><span onclick="deleteAd(\''.$this -> getColumnData($row, 'id').'\')" class="fa fa-trash fa-lg ml-3 mt-3" style="color: #0275d8;"></span></a>'.
'</td>'.
'</tr>';
$siteDomain = SITE_DOMAIN_FULL;
$siteProtocol = SITE_PROTOCOL;
$rtn .=<<<HTMLTABLE
<tr id="{$this -> getColumnData($row, 'id')}">
<td><img src="{$siteProtocol}://{$siteDomain}/documents/ads/{$this -> getColumnData($row, 'file_name')}" class="img-thumbnail" alt="Cinque Terre" width="70">'</td>
<td><p class="ml-3 mt-3">{$this -> getColumnData($row, 'ads_id')}</p></td>
<td><p class="ml-3 mt-3">{$this -> getColumnData($row, 'file_name')}</p></td>
<td><p class="ml-3 mt-3">{$this -> getAdminNameByUid($this -> getColumnData($row, 'created_by'))}</p></td>
<td><p class="ml-3 mt-3">{$this -> getColumnData($row, 'create_time')}</p></td>
<td class="blocka">
<a href="#">
<span id="{$this -> getColumnData($row, 'id')}" class="fa fa-info-circle fa-lg ml-3 mt-3" style="color: #0275d8;"></span>
</a>
</td>
<td class="blocka">
<a href="javascript:deleteAd('{$this -> getColumnData($row, 'id')}')">
<span class="fa fa-trash fa-lg ml-3 mt-3" style="color: #0275d8;"></span>
</a>
</td>
</tr>
HTMLTABLE;
}
} else {
$rtn = '<tr><td colspan="6">' . $this -> getMessage(INFO, 'I_NO_SUCHE_SEARCH_DATA', array()) . '</td></tr>';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment