tag:blogger.com,1999:blog-56195508131836648882024-03-19T10:44:14.361+08:00Ye5A blog about how to make money, improve beauty, website, animation, graphic design, living skills, life.zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.comBlogger532125tag:blogger.com,1999:blog-5619550813183664888.post-83637947689672735572024-01-20T03:33:00.006+08:002024-01-20T03:33:57.753+08:00jquery click on each line of td to pop up window content<textarea style="height: 890px; width: 670px;">
$('td').on('click', function(eventData) {
var full = $(this).text();
var pairSymbol = $(this).contents().eq(0).text();
var pairSymbolClearSpace = pairSymbol.split(" ").join("");
var lineHeight = $(this).css("line-height");
lineHeight = parseInt(lineHeight.substring(0, lineHeight.length - 2));
var line = Math.floor(eventData.offsetY / lineHeight);
var fullLine = ($(this).text().split("\n")[line]);
var splitFullLine = fullLine.split(" = ");
var tElement = splitFullLine[0];
var tElementClearSpace = tElement.split(" ").join("");
var beforeStar = splitFullLine[1].split("*");
var buySell = beforeStar[0];
var buySellClearSpace = buySell.split(" ").join("");
$("#pairSymbol").val("");
$("#tElement").val("");
$("#tElement").val("");
$("#winCount").val("");
$("#lossCount").val("");
$("#pairSymbol").val(pairSymbolClearSpace);
$("#tElement").val(tElementClearSpace);
$("#buySell").val(buySellClearSpace);
//alert(buySell);
$.ajax({
type: "POST",
url: "modal_view_winLoss.php",
data: {
pairSymbol: pairSymbolClearSpace,
tElement: tElementClearSpace,
buySell: buySellClearSpace
},
cache: false,
success:function(data)
{
if(data == "error")
{
location.reload();
}
else
{
var winLoss = data.split("##");
$("#winCount").val("");
$("#lossCount").val("");
$("#winCount").val(winLoss[0]);
$("#lossCount").val(winLoss[1]);
}
}
});
</textarea>zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-72027707700731883652024-01-20T03:27:00.002+08:002024-01-20T03:34:07.755+08:00jquery select all same text on the whole page<textarea style="height: 870px; width: 670px;">
<button type="button" onclick="mark('寅')">寅</button>
<script>
// Start Highlight text on whole page.
function mark(char) {
let contentElement = document.getElementById('sentences');
let textNodes = getTextNodes(contentElement);
// Clear previous highlights
unmarkAll(textNodes);
// Use a regular expression to find all occurrences of the character
let regex = new RegExp(char, 'g');
textNodes.forEach(node => {
let textContent = node.textContent;
let matches = textContent.matchAll(regex);
for (const match of matches) {
let range = document.createRange();
range.setStart(node, match.index);
range.setEnd(node, match.index + match[0].length);
let markElement = document.createElement('mark');
range.surroundContents(markElement);
}
});
}
function getTextNodes(element) {
let walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT, null, false);
let textNodes = [];
while (walker.nextNode()) {
textNodes.push(walker.currentNode);
}
return textNodes;
}
function unmarkAll(nodes) {
nodes.forEach(node => {
let parentNode = node.parentNode;
if (parentNode && parentNode.nodeName === 'MARK') {
let textNode = document.createTextNode(node.textContent);
parentNode.replaceWith(textNode);
}
});
}
// End Highlight text on whole page.
</script>
</textarea>zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-26840550210271488642024-01-20T03:21:00.012+08:002024-01-20T09:00:13.892+08:00jquery how to select character before '=' and add the character after '*' and before <br/ > : Add winCount and lossCount before <br/ ><textarea style="height: 1000px; width: 670px;">
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<script>
$(document).ready(function() {
//start adding winCount and lossCount to beside
var dbData = <?php echo json_encode($arrayDbData); ?>;
var myString = JSON.stringify(dbData); //convert json to string
myString = myString.slice(2); //remove 1st 2 characters
myString = myString.slice(0,-2) //remove last 2 characters
myString = myString.replace(/[,"]/g, ''); //remove ","
var arrayLine = myString.split('<br>');
var i = 0;
jQuery.each(arrayLine, function() {
var eachData = arrayLine[i].split('##');
var pairSymbol = eachData[0].trim();
var elementName = eachData[1];
var winCount = eachData[2];
var lossCount = eachData[3];
//hehe
let targetTd = $('td:contains("' + pairSymbol + '")');
if (targetTd.length > 0) {
let tdContent = targetTd.html();
var $html = $(`<span>${tdContent}</span>`);
$html.each(function() {
if ($(this).text().includes(elementName)) {
$(this).html(function(index, oldHtml) {
//return oldHtml.replace('*<br>', '* <span style="color:blue;">' + winCount + ' </span><span style="color:red;">' + lossCount + '</span><br>');
var escapedElement = elementName.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
var regex = new RegExp('(' + escapedElement + '.*?)(<br>)');
return oldHtml.replace(regex, '$1 <span style="color:blue;">' + winCount + ' </span><span style="color:red;">' + lossCount + '</span>$2');
});
$('td:contains("' + pairSymbol + '")').html($html.prop('outerHTML'));
return false; // Exit the loop once the line is found
}
});
//console.log($html.prop('outerHTML'));
} else {
console.log('No matching <td> found.');
}
i++;
});
});
</script>
</textarea>zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-32073547589506469722024-01-15T07:01:00.001+08:002024-01-15T07:01:03.489+08:00Software Chinese Language on Windows 10Windows search language setting > Region > Additional Date Time and Region Settings > Region : Change Date Time and Region Format > <br/><br/>
1) Formats Tab > Format : English (United States)<br/><br/>
2) Admistrative Tab > Language for non-Unicode programs (Change system locale...) > Chinese (Simplified, Singaotre) > Uncheck UTF-8<br/><br/>zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-83751191108478867542023-11-03T06:37:00.007+08:002023-11-03T21:18:14.249+08:00My first covid experience2023 Oct 26 was my first infected covid.</br></br>
I though it was just normal fever and sorethroat.</br></br>
But many strange symptom :</br></br>
1) My eyes very tired always want to close and sleep. I can sleep for 3 days without eat, without shower. Normally people sleep fully 8 hours already enough, but I sleep 60 hours still not enough.</br></br>
2) I checked my heart rate increase to 110, I asked phamacy is it normal if heart rate 110 during fever? they said NOT normal.</br></br>
3) I drink alot of water but still no pee, my little pee was yellow color. I guess all water stuck on stomach can't digest water, and i always vomit out the water and food.</br></br>
4) I don't have appertise to eat anything. I continue 3 days no eat anything, i worry gastric will happen. I don't even has energy to bite any food. I try to cook maggie mee, then 1st bite on the mee feel very tired lazy to bite, I think i can hold the mee in my mouth to let it disolve itself, but it can't, so i just throw it all. Then i cook poride and drink poride every 5 hours just to prevent gastric. </br></br>
5) My room is hot but my hold body feel cold. Especially bottom of my legs and hand palm area feeling super cold.</br></br>
6) When my fever is gone today, then i feel good. Then tomorow fever come back again wtf. Doctor say this is covid symptom fever always come back again on next day.</br></br>
7) When fever, luckly my muscles feel no sour and no pain, but i feel no energy to move, I walk like turtle speed. Easy get tired.</br></br>
8) After 1 week, my head dizzy, i think because there are many anti-virus armies produced in 1 week to protect my lung, so virus can't stay in lung anymore, so virus goes up live on my brain, virus attack my brain so my brain dizzy?</br></br>zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-18107167619871871142023-10-14T19:01:00.003+08:002023-10-14T19:01:52.343+08:00Stop ajax from submitting form before validate formJust move html submit button to outside the form.
After validate form successfully then only trigger form submision.
zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-45554486836212883232023-09-19T14:51:00.002+08:002023-09-19T14:51:19.019+08:00PHP mailer cannot send email, gmail smtp error.1 - Contact customer service of your hosting server to set firewall allow gmail smtp port 587<br/><br/>
2 - follow the steps on this webpage to install the latest version phpmailer to your hostingzac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-72478579768462439922023-08-28T20:55:00.024+08:002023-10-31T06:33:39.936+08:00Sql and pdo give error when upgraded to mysql new version 8.0.34When my shared hosting upgrade mysql version from 5 to 8, many of my php websites cannot be openned.<br/><br/>
I checked php error log saw many syntax become error.<br/><br/>
So here are the fixes of syntax :<br/>
Codeigniter : Library > common.php<br/>
<textarea style="height: 170px; width: 670px;">
Old variable
$where = "Where id=123"
need to modify it become :
$where = "id=123"
So we need to remove "Where" from variable.
$where2 = substr($where,6);
</textarea><br /><br /><br />
Cannot combine <b>Select, Table, Where</b> in 1 query.<br />
Must saperate <b>Select, Table, Where</b>.<br /><br />
<textarea style="height: 500px; width: 670px;">
//Problem code :
function getSelectedOneField($select,$table,$where)
{
$q = "select $select from $table $where";
$query=$this->CI->db->query($q);
$result = $query->row_array();
return $result[$select];
}
//Solution code :
function getSelectedOneField($select, $table, $where)
{
$this->CI->db->select($select);
$this->CI->db->from($table);
$where2 = substr($where,6);
$this->CI->db->where($where2);
$query = $this->CI->db->get();
$result = $query->row_array();
if ($result) {
return $result[$select];
}
return null; // Return an appropriate value if no result is found
}
</textarea><br /><br /><br />
Cannot write query join tables in 1 query (library/common.php).<br />
Must saperate <b>join tables</b>.<br /><br />
<textarea style="height: 700px; width: 670px;">
// Problem codes :
$total_invested = $this->getSelectedOneField("SUM(p.investment_capital) AS abc", "tbl_product_order o LEFT JOIN tbl_package_master p ON p.id = o.package_id", "WHERE o.status = 3 AND o.user_id = '" . $user_id . "'");
// Solution codes :
function getSelectedOneFieldJoinTbl($select, $table, $where, $join_table, $join_condition)
{
$this->CI->db->select($select);
$this->CI->db->from($table);
$where2 = substr($where,6);
$this->CI->db->where($where2);
if($join_table && $join_condition)
{
$this->CI->db->join($join_table, $join_condition);
}
$query = $this->CI->db->get();
$result = $query->row_array();
if ($result) {
return $result[$select];
}
return null; // Return an appropriate value if no result is found
}
$total_invested = $this->getSelectedOneFieldJoinTbl(
"SUM(p.investment_capital)",
"tbl_product_order o",
"WHERE o.status = 3 AND o.user_id = '" . $user_id . "'",
"tbl_package_master p", // $join_table
"p.id = o.package_id" // $join_condition
);
</textarea><br /><br /><br />
Must saperate Group_By :<br /><br />
<textarea style="height: 700px; width: 670px;">
function getAllRecJoinTblGroupBy($select, $table, $join_table, $join_condition, $where, $group_by)
{
$this->CI->db->select($select);
$this->CI->db->from($table);
if($join_table && $join_condition)
{
$this->CI->db->join($join_table, $join_condition);
}
$where2 = substr($where,6);
$this->CI->db->where($where2);
$group_by2 = substr($group_by,8);
$this->CI->db->group_by($group_by2);
$query = $this->CI->db->get();
$result = $query->row_array();
}
$total_direct_all_child1 = $this->getAllRecJoinTblGroupBy(
"u.user_id, u.username, u.unique_code, u.user_email, p.id, p.status",
"tbl_user_master u",
"tbl_product_order p",
"p.user_id = u.user_id",
"WHERE
u.sponsor_id = '".$total_direct_child['user_id']."'
AND u.status = 1
AND u.user_type = 2
AND p.status = 3",
"GROUP_BY u.user_id"
);
</textarea><br /><br /><br />
Must saperate Order_By :<br /><br />
<textarea style="height: 350px; width: 670px;">
function getAllRecOrderBy($select,$table,$where,$order_by=null) // GET ALL RECORDS WITH SELECT STRING
{
$where2 = substr($where,6);
$this->CI->db->select($select);
$this->CI->db->from($table);
$this->CI->db->where($where2);
$this->CI->db->order_by($order_by);
$query = $this->CI->db->get();
$result = $query->row_array();
}
$member = $this->common->getAllRecOrderBy(
"user_id,username,first_name, last_name, rank",
"tbl_user_master",
"WHERE status != 3 AND user_type = 2",
"first_name", "ASC",
"last_name", "ASC"
);
</textarea><br /><br /><br />
Php pdo :
<textarea style="height: 440px; width: 670px;">
//Problem Code:
$sql = 'SELECT
payment_date,
SUM(price),
SUM(profit)
FROM sale
WHERE seller_id = ? && Year(payment_date) = ?
GROUP BY Month(payment_date) DESC';
$q = $conn->prepare($sql);
$result = $q->execute(array($user_id, $selected_year));
//Solution Code:
$sql = 'SELECT
payment_date,
SUM(price) AS price_total,
SUM(profit) AS profit_total
FROM sale
WHERE seller_id = :spender_id && Year(payment_date) = :payMYear
GROUP BY Month(payment_date)
ORDER BY payment_date DESC';
$stmt = $conn->prepare($sql);
$stmt->bindParam(':spender_id', $user_id, PDO::PARAM_INT);
$stmt->bindParam(':payMYear', $selected_year);
$stmt->execute();
</textarea><br />
select and display data from database :</br>
important at :</br>
1) try </br>
2) {$row['id']}</br>
<textarea style="height: 540px; width: 670px;">
try
{
$dbhost = "localhost";
$dbusername = "aekcom_zac1987";
$dbpassword = "h~m_*MqTH*pD";
$dbname = "aekcom_idea4better";
$pdo = new PDO("mysql:host=$dbhost;charset=utf8mb4;dbname=$dbname", $dbusername, $dbpassword);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "SELECT * FROM ckeditorSummernote";
$stmt = $pdo->prepare($sql);
$stmt->execute();
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($result as $row)
{
echo "<tr>";
echo "<td>{$row['id']}</td>";
echo "<td>{$row['title']}</td>";
echo "<td>{$row['content']}</td>";
echo "</tr>";
}
} catch (PDOException $e) {
echo "Error: " . $e->getMessage();
}
$pdo = null;
</textarea><br />
Join 2 tables + Group_by + Order_by :<br /><br />
<textarea style="height:550px; width: 670px;">
function getSelectedOneFieldJoin2TblGroupOrder($select, $table, $where, $join_table1, $join_condition1, $join_table2, $join_condition2, $order_by=null, $group_by=null)
{
$this->CI->db->select($select);
$this->CI->db->from($table);
$where2 = substr($where,6);
$this->CI->db->where($where2);
if($join_table1 && $join_condition1)
{
$this->CI->db->join($join_table1, $join_condition1, 'left');
}
if($join_table2 && $join_condition2)
{
$this->CI->db->join($join_table2, $join_condition2, 'left');
}
$this->CI->db->order_by($order_by);
$group_by2 = substr($group_by,8);
$this->CI->db->group_by($group_by2);
$query = $this->CI->db->get();
$result = $query->result_array();
if ($result) {
return $result;
}
return null; // Return an appropriate value if no result is found
}
</textarea><br /><br /><br />
If sql got error then check this two things :<br /><br />
<textarea style="height: 150px; width: 670px;">
$query = $this->CI->db->get();
$result = $query->result_array();
$query->result_array(); //get many rows of records so use foreach loop.
$query->row_array(); //get only 1 record.
</textarea><br /><br /><br />
Limit : (Must delete limit if no use limit, otherwise no result will show) <br /><br />
<textarea style="height: 450px; width: 670px;">
function getAllRec2($select, $table, $where, $order_by=null, $limit=null)
{
$this->CI->db->select($select);
$this->CI->db->from($table);
$where2 = substr($where,6);
$this->CI->db->where($where2);
$this->CI->db->order_by($order_by);
$limit2 = substr($limit,6);
$this->CI->db->limit($limit2);
$query = $this->CI->db->get();
return $query->result_array();
}
$res_data[]=$res2=$this->common->getAllRec2(
" 'New Member Registered' as activity_title, u.created_on as created_on, concat(u.first_name, ' ', u.last_name) as created_by",
"tbl_user_master u",
"WHERE u.status != 2 and u.status != 0 ", //and u.created_on >= DATE_ADD(CURDATE(), INTERVAL -3 DAY)
"u.created_on", "ASC",
"Limit 5"
);
</textarea><br /><br /><br />
php variable in WHERE clause :<br /><br />
<textarea style="height: 50px; width: 670px;">
"WHERE u.user_type = 2 AND u.status != 3 /'{$where}/'" ,
</textarea><br /><br /><br />
wordpress error :<br /><br />
<textarea style="height: 150px; width: 670px;">
Severity: error --> Exception: Call to undefined function curl_init()
I think your hosting comment out curl on php.ini
Where can i edit php.ini file?
I want to remove the ; mark from the beginning of the following line:
;extension=php_curl.dll
</textarea><br /><br /><br /> zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-74452692850117223982023-06-04T07:35:00.004+08:002023-06-04T07:58:22.348+08:00150% Profit EA<h1 style="color:cyan;">150% Profit EA</h1>
<img src="https://toto180.com/images/150profit-ea-myfxbook1.jpg" style="border:solid blue 3px; width:650px; margin-left:10px;"><br/><br/>
<img src="https://toto180.com/images/150profit-ea-myfxbook2.jpg" style="border:solid blue 3px; margin-left:10px;"><br/><br/>
Do you want to earn <span class="bigtext">10% to 40% profit</span> monthly from this EA robot?<br/><br/>
USD100 real money (USD10000 Cent account) to trade 1 pair : XAUUSD<br/>
15minutes TF.<br/><br/>
Download and lot the setting file as picture below :<br/>
<img src="https://toto180.com/images/150profit-ea-settings.jpg" style="border:solid blue 3px; width:95%; margin-left:10px;"><br/><br/>
This 150% Profit EA only works perfectly on Roboforex broker :<br/>
<a target="_blank" href="https://my.roboforex.com/en/?a=pbxk">https://my.roboforex.com/en/?a=pbxk</a><br/><br/>
My Roboforex Referral Code ➜ pbxk<br/><br/>
You will get <b><span style="color:cyan;">100% bonus</span></b> if register through <b><span style="color:cyan;">my affiliate link</span></b>.<br/>
For example, you deposit usd50, <b><span style="color:cyan;">you get usd50 bonus</span></b>. So total you get USD100 in your MT4 account.<br/><br/>
<a href='https://toto180.com/150profitEA.php'>Download 150% Profit EA File<br> <img style="margin-left:10px;" src="https://toto180.com/download-button-red.png"></a>zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-28936961496277345252022-01-21T06:45:00.008+08:002022-01-22T08:04:00.274+08:00Backtest EA on news filter.Now you will need to download the news csv file from https://www.fxstreet.com/economic-calendar (max 3 months, then combine all).
<br /><br />
After the newslist is downloaded, you will need to edit the list. I am using EmEditor for that.<br />
Open your csv file in EmEditor (Ctrl-O)<br /><br />
File open in editor:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEg29mCCJmw3PZrFy27QuBBjQA3tWrXEf6J9fcUbkzOIhtqKhiQWioz6CValdDx2GdBUVEnEkAFTcjTKM39O2xjGc9BWzUTAdGuZZhB-QZFITHVJxQeatJfKYR79yZNdJq7pRuCfArVXOADUy2jbOT5X-q2dlSmoV92-F6V_IyWcSj-Tp3XbzWO2j7CsDw=s1425" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="727" data-original-width="1425" src="https://blogger.googleusercontent.com/img/a/AVvXsEg29mCCJmw3PZrFy27QuBBjQA3tWrXEf6J9fcUbkzOIhtqKhiQWioz6CValdDx2GdBUVEnEkAFTcjTKM39O2xjGc9BWzUTAdGuZZhB-QZFITHVJxQeatJfKYR79yZNdJq7pRuCfArVXOADUy2jbOT5X-q2dlSmoV92-F6V_IyWcSj-Tp3XbzWO2j7CsDw=s670" width="670" /></a></div>
First thing to do is to delete the first column, right click on the top of the first column and select delete column
<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi5frRzbtwge4Gi8Y_PuLVMga4CRXA5KD54E_pMKd7QIK0evoU55UdmUGkYYrks5p9fWNzuZQc9IvArEV2aE81MLQP8u_UQ7Se9OLrPgCagkNvV1eC9QjWVoCMZXHYtBuT0VyWrfvC7G03bR36HgYlm0UMH-arzycNyi_pnArhXCBKfU-jxVK5WynfRbg=s686" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="615" data-original-width="686" src="https://blogger.googleusercontent.com/img/a/AVvXsEi5frRzbtwge4Gi8Y_PuLVMga4CRXA5KD54E_pMKd7QIK0evoU55UdmUGkYYrks5p9fWNzuZQc9IvArEV2aE81MLQP8u_UQ7Se9OLrPgCagkNvV1eC9QjWVoCMZXHYtBuT0VyWrfvC7G03bR36HgYlm0UMH-arzycNyi_pnArhXCBKfU-jxVK5WynfRbg=s670" width="670" /></a></div>
Column deleted:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj_m3X_2T1Lgi5G791FqI_tR7EkM5c53fnm6gug3KzLEfde9B4h-Pb3YwCKuoLvUukS4papstEEbwqCSPKpfsnA1J-qbRarHmDxI1rMdyHkgczjvKhChhrulpSu0u9kHekt34XQPVjCGBGhEU-T2uAkLA7WMM2V00qKSiouxumG_QTyxZuv_qba21RSfg=s648" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="473" data-original-width="670" src="https://blogger.googleusercontent.com/img/a/AVvXsEj_m3X_2T1Lgi5G791FqI_tR7EkM5c53fnm6gug3KzLEfde9B4h-Pb3YwCKuoLvUukS4papstEEbwqCSPKpfsnA1J-qbRarHmDxI1rMdyHkgczjvKhChhrulpSu0u9kHekt34XQPVjCGBGhEU-T2uAkLA7WMM2V00qKSiouxumG_QTyxZuv_qba21RSfg=s670" width="670" /></a></div>
Now we need to split the date and time column, rightclick on the Date time column and select "Split column"<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgjP6ZUaT4ivjS2fTOkgZDzGbsLvNBqjC9pkLFOi1dZn41TCgm85q2MgbZQOXufEjfok3uK8u9unAzRaxQMQu9gASxaeDdIgLqw6oX2hIQELy9j0zAwj3nE52RW5eLPunkerKtJntO8V90A-HBmLCJbZVIrewHq7vju0YXKLryNG-R0PH4I0KLVIHc04Q=s596" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="596" data-original-width="522" src="https://blogger.googleusercontent.com/img/a/AVvXsEgjP6ZUaT4ivjS2fTOkgZDzGbsLvNBqjC9pkLFOi1dZn41TCgm85q2MgbZQOXufEjfok3uK8u9unAzRaxQMQu9gASxaeDdIgLqw6oX2hIQELy9j0zAwj3nE52RW5eLPunkerKtJntO8V90A-HBmLCJbZVIrewHq7vju0YXKLryNG-R0PH4I0KLVIHc04Q=s670" width="670" /></a></div>
In the Split column window, make one space(spacrebar) in Seperator entry and click Ok button<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhgKwyUZS7gtKU42YEPtj9BBOYHTC505F6uikb5GcQyjkg8bvWK_I2eFUxaHvaHkcBL6id5R9SOLcci07Wm5e4Jd4bJecvS8-IrQDhSN5h36yOeB7-6NbZBQDp2YhmENrrYpRhYO131frVLWnCB7Dmb_PbwHnYhdNAAq7k5Lg53-9Dez9fZWqqT-6rjbQ=s524" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="425" data-original-width="524" src="https://blogger.googleusercontent.com/img/a/AVvXsEhgKwyUZS7gtKU42YEPtj9BBOYHTC505F6uikb5GcQyjkg8bvWK_I2eFUxaHvaHkcBL6id5R9SOLcci07Wm5e4Jd4bJecvS8-IrQDhSN5h36yOeB7-6NbZBQDp2YhmENrrYpRhYO131frVLWnCB7Dmb_PbwHnYhdNAAq7k5Lg53-9Dez9fZWqqT-6rjbQ=s670" width="670" /></a></div>
The Date and Time(hours) is now splitted into 2 columns<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjgZfL76ZOCHsU-GLgZom25lt7EIdv8r1a0TBsjPTB-l70KqMjIihmGl12YiLHhZh3ayncLhRW_EYruEkz_LuS0UoSYc280Ptf9MMP7sWlP0TTMFflT7neGILX-VOJkAHOdfSxvhvKYE-nMN-F_shJ-Jg2ifVoNXI8pCSKtQXhZXKLG8NFZMLU8jCKiRA=s651" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="460" data-original-width="651" src="https://blogger.googleusercontent.com/img/a/AVvXsEjgZfL76ZOCHsU-GLgZom25lt7EIdv8r1a0TBsjPTB-l70KqMjIihmGl12YiLHhZh3ayncLhRW_EYruEkz_LuS0UoSYc280Ptf9MMP7sWlP0TTMFflT7neGILX-VOJkAHOdfSxvhvKYE-nMN-F_shJ-Jg2ifVoNXI8pCSKtQXhZXKLG8NFZMLU8jCKiRA=s670" width="670" /></a></div>
Next step is to convert the Date format so MT4 can use it, open replace window (Ctrl-H)<br /><br />
In the "Find" you write exactly this string: ([0-9]{1,2})/([0-9]{1,2})/([0-9]{2,4})<br /><br />
In the "Replace with" you enter exactly this string: \3.\1.\2<br /><br />
Choose regular Expressions and click on "replace all" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiy6-OtoxSj_GoLHxEx88q2bbBdIbatn-i-uXeR0CY2dD3sCzpH-LWc8jOm68le8-4X_rK7NuRnEL7cFkSnQwr5OGkqwIOWSw13eZ51ABf7B3FBqNbhV0hzom-QiLJWDGYWshdYZqhxs4yovSja1b-6XzgFFkN5ceMOZUg8i1HgqExhuH6TAysPJIHzUQ=s496" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="320" data-original-width="496" src="https://blogger.googleusercontent.com/img/a/AVvXsEiy6-OtoxSj_GoLHxEx88q2bbBdIbatn-i-uXeR0CY2dD3sCzpH-LWc8jOm68le8-4X_rK7NuRnEL7cFkSnQwr5OGkqwIOWSw13eZ51ABf7B3FBqNbhV0hzom-QiLJWDGYWshdYZqhxs4yovSja1b-6XzgFFkN5ceMOZUg8i1HgqExhuH6TAysPJIHzUQ=s670" width="670" /></a></div>
The list now looks like this:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEh6GXDGlXx-CQgsBLOXId0Q8gxY5nvq762w-_VU-DxtQ-4DOznXe9vSPxBuVpNOkHWKBnGgW66ATfMrF7eIBIt4EK5OY3c5vMjtpfHvGbVeOS6h8GYu4_2bc1f_BuocunucsQV6uQgfnCkYdwYs3okiX_rMDmdaDqlzLYZ7AEjGgY5vLKlSZaIFP-QqCA=s645" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="462" data-original-width="645" src="https://blogger.googleusercontent.com/img/a/AVvXsEh6GXDGlXx-CQgsBLOXId0Q8gxY5nvq762w-_VU-DxtQ-4DOznXe9vSPxBuVpNOkHWKBnGgW66ATfMrF7eIBIt4EK5OY3c5vMjtpfHvGbVeOS6h8GYu4_2bc1f_BuocunucsQV6uQgfnCkYdwYs3okiX_rMDmdaDqlzLYZ7AEjGgY5vLKlSZaIFP-QqCA=s670" width="670" /></a></div>
Now select all columns in the first row, then rightclick and select "Delete" from the dropdown menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj39HdkLIqLfsdfRPNkfFsrxRHX1XW7JojAke8i9P174uhB9Aq3wKpZLk58rWDHKBSnzSsNqUbbGHKk4v1nHaPhOUTjrNPnFe49tz-zkPU_csBCRrhgnMqVg7PGy1KBbgZdcNlr2nDU1qWKbmrGHbzklfjClzmC8sWdR-YL_8MNECzpVFta6v7yJ6A9WQ=s538" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="525" data-original-width="538" src="https://blogger.googleusercontent.com/img/a/AVvXsEj39HdkLIqLfsdfRPNkfFsrxRHX1XW7JojAke8i9P174uhB9Aq3wKpZLk58rWDHKBSnzSsNqUbbGHKk4v1nHaPhOUTjrNPnFe49tz-zkPU_csBCRrhgnMqVg7PGy1KBbgZdcNlr2nDU1qWKbmrGHbzklfjClzmC8sWdR-YL_8MNECzpVFta6v7yJ6A9WQ=s670" width="670" /></a></div>
Ok! :) The list is now finnished, you can now save it.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgCpZDg08SYP-E0QvisJwUqY7rLr2ruwJq0NbVq4yD6TEkEMdvmVhtgyjfwZGTYRBsSfQQr4Pj9o6lmHkZ6UsZbW9iwJE-N8eDO4GuSJ3DvN7Yo54wOndkA3KEiswfK3mYi9P-ratTla-I_ugwfiOpp5YUtDfVk2HZUvbj-hIw9yuj8Yy0cFzITpaTj9Q=s657" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="506" data-original-width="657" src="https://blogger.googleusercontent.com/img/a/AVvXsEgCpZDg08SYP-E0QvisJwUqY7rLr2ruwJq0NbVq4yD6TEkEMdvmVhtgyjfwZGTYRBsSfQQr4Pj9o6lmHkZ6UsZbW9iwJE-N8eDO4GuSJ3DvN7Yo54wOndkA3KEiswfK3mYi9P-ratTla-I_ugwfiOpp5YUtDfVk2HZUvbj-hIw9yuj8Yy0cFzITpaTj9Q=s670" width="670" /></a></div>
You need to put the list(csv file) in your terminal ./tester/files/ folder<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhqQH1eQO7G3JRvhfhwUIkJeKKJ2dfhSwMVkLfTbVF-ukl0ouUZu7mQvSYIhAP65yI6J3GtrzuCzE9R0DASW0uFgOddOQrDGal0sdk2wlHZFGI4VedwQ3GSC1W06cRp08XyItLLiAWC4TweKQMxMHFTcIeJaJOP6N6ZG8wGXw-vWpmf-4nA6gmGWfzPEg=s844" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="197" data-original-width="844" src="https://blogger.googleusercontent.com/img/a/AVvXsEhqQH1eQO7G3JRvhfhwUIkJeKKJ2dfhSwMVkLfTbVF-ukl0ouUZu7mQvSYIhAP65yI6J3GtrzuCzE9R0DASW0uFgOddOQrDGal0sdk2wlHZFGI4VedwQ3GSC1W06cRp08XyItLLiAWC4TweKQMxMHFTcIeJaJOP6N6ZG8wGXw-vWpmf-4nA6gmGWfzPEg=s670" width="670" /></a></div>
In MT4 backtesting Expert properties remember to write in the file name for the file you just putted in the tester/files folder.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj3k6SEiVIAGASxqQq1o-xNbo4aemv_LfHZ8wkZ5A3H7fwX284lBOdzrCku6w5a-efAuRDXPVeBu8DL6twDLhKBfbRuVqbgRUe2gUumiX_C6nK8ac9A8X7wFNHRLRDCg13hIbHkLZj_YcVZiWLaFYLD0djnL0eAfGhAdHQppNw72KwqQVKyEtPmwWDZNg=s1070" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="729" data-original-width="1070" src="https://blogger.googleusercontent.com/img/a/AVvXsEj3k6SEiVIAGASxqQq1o-xNbo4aemv_LfHZ8wkZ5A3H7fwX284lBOdzrCku6w5a-efAuRDXPVeBu8DL6twDLhKBfbRuVqbgRUe2gUumiX_C6nK8ac9A8X7wFNHRLRDCg13hIbHkLZj_YcVZiWLaFYLD0djnL0eAfGhAdHQppNw72KwqQVKyEtPmwWDZNg=s670" width="670" /></a></div>
Then open Sublime ctrl + H to replace , to ;<br /><br />
-------------------------<br /><br />
insert this to weburl at option : https://nfs.faireconomy.media/ff_calendar_thisweek.xml
<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi2ATRuD-IGyAeKnD52eRm1qfO6nXHlurEa4C8f0OZZhLZhT2kNOwe9wruHqFQH7fsCFD7v14F-p8lIScg-IMYovBPO13tLMDtADUZdlqFOIVOrT_4Fv0xVhuGCR8IGqE4FeeqCUzjCgSNMsQiSaDmBGsBQt5On0OQHCsjSpjpu3SF_JaF68BrJFZTsiA=s618" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="670" data-original-height="448" data-original-width="618" src="https://blogger.googleusercontent.com/img/a/AVvXsEi2ATRuD-IGyAeKnD52eRm1qfO6nXHlurEa4C8f0OZZhLZhT2kNOwe9wruHqFQH7fsCFD7v14F-p8lIScg-IMYovBPO13tLMDtADUZdlqFOIVOrT_4Fv0xVhuGCR8IGqE4FeeqCUzjCgSNMsQiSaDmBGsBQt5On0OQHCsjSpjpu3SF_JaF68BrJFZTsiA=s670"/></a></div>
zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-53953341711668501352021-11-15T05:42:00.011+08:002021-11-15T05:49:03.768+08:00Forex Support And Resistance EA for free downloadSupport And Resistance EA <br/><br/>
You may use the Support and Resistance Indicator without EA to ease your trading.
<br/><br/>
Support Resistance has 4 types :<br/>
1) Weak.<br/>
2) untested.<br/>
3) Verified.<br/>
4) Proven.<br/><br/>
This EA open trade at untested Support and Resistant.<br/>
this EA won't open trade on Weak, Verified, Proven SR.<br/><br/>
You may ask me customize this EA to fit your trading style. <br/><br/>
Download Ea file and indicators files link at :<br/>
<a href="https://www.shorturl.at/etyC1">https://www.shorturl.at/etyC1</a>
<br/>
------------------------------------------<br/>
Installation setup instruction steps video at :<br/>
<a href="https://www.youtube.com/watch?v=mg-BehDDRBk">https://www.youtube.com/watch?v=mg-BehDDRBk</a>
<br/>
------------------------------------------<br/>
zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-53636140159406112021-10-21T02:22:00.013+08:002022-04-06T05:58:07.686+08:00mql4 tutorialCheck active order previous buy entry price is far enough from current entry then only open a new buy order :
<textarea style="height: 1100px; width: 670px;">
if((Close[1] > D45RecentBarHighest1 && Close[2] > D45RecentBarHighest2) || (Close[1] > D45RecentBarHighest1 && Close[3] > D45RecentBarHighest3))
{
if(Bars != ThisBarTrade)
{
int orderopen3 = 0;
for (int z=OrdersTotal(); z>=0; z--)
{
if ( OrderSelect(z, SELECT_BY_POS,MODE_TRADES) // Only my orders w/
&& OrderSymbol() == Symbol()
&& OrderType()==OP_SELL
){
if ((Bid > OrderOpenPrice() && (Bid - OrderOpenPrice())/_Point < 410) || (Bid < OrderOpenPrice() && (OrderOpenPrice() - Bid)/_Point < 410) || Bid == OrderOpenPrice())
{
orderopen3 = 1;
}
}
}
if (orderopen3 == 0)
{
if(Bid > cantSellLevel)
{
TP_TMP = (0);
if(OrderSend(_Symbol,OP_SELL , NormalizeDouble( sellLot ,2 ) ,Bid,3, SL_TMP, TP_TMP ,MagicNumber ,MagicNumber,0,Red)){}
ThisBarTrade = Bars;
sellLot = sellLot * 1.7;
}
}
}
}
if((Close[1] < D45RecentBarLowest1 && Close[2] < D45RecentBarLowest2) || (Close[1] < D45RecentBarLowest1 && Close[3] < D45RecentBarLowest3))
{
if(Bars != ThisBarTrade)
{
int orderopen2 = 0;
for (int b=OrdersTotal(); b>=0; b--)
{
if ( OrderSelect(b, SELECT_BY_POS,MODE_TRADES) // Only my orders w/
&& OrderSymbol() == Symbol()
&& OrderType()==OP_BUY
){
if ((Ask > OrderOpenPrice() && (Ask - OrderOpenPrice())/_Point < 410) || (Close[1] < OrderOpenPrice() && (OrderOpenPrice() - Ask)/_Point < 410) || (Ask == OrderOpenPrice()))
{
orderopen2 = 1;
}
}
}
if (orderopen2 == 0)
{
if(Ask < cantBuyLevel)
{
TP_TMP = (0);
if(OrderSend(_Symbol,OP_BUY , NormalizeDouble( buyLot ,2 ) ,Ask,3, SL_TMP, TP_TMP ,MagicNumber ,MagicNumber,0,DeepSkyBlue)){}
ThisBarTrade = Bars;
buyLot = buyLot * 1.7;
}
}
}
}
</textarea><br />
----------------------------------
<br />
To get highest price datetime :
<textarea style="height: 150px; width: 670px;">
double HighPrice = iHigh(Symbol(),0,iHighest(NULL,0,MODE_HIGH,1900,2));
double LowPrice = iLow(Symbol(),0,iLowest(NULL,0,MODE_LOW,1900,2));
int forHighTime = iHighest( NULL,0,MODE_HIGH,1900);
int forLowTime = iLowest( NULL,0,MODE_LOW,1900);
datetime highestDateTime = iTime(_Symbol,_Period, forHighTime);
datetime lowestDateTime = iTime(_Symbol,_Period, forLowTime);
</textarea><br />
----------------------------------
<br />
To put TP on Order :
<textarea style="height: 50px; width: 670px;">
</textarea><br />
----------------------------------
<br />
Modify TP :
<textarea style="height: 900px; width: 670px;">
void Modify_TP()
{
total=OrdersTotal();
for(cnt = total-1; cnt >= 0; cnt--)
{
if(OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES)){}
if( OrderSymbol() == _Symbol )
{
if( OrderType() == OP_BUY )
{
if(
( (( OrderOpenPrice() - Ask )/_Point) >= 300 )
&& ( (( OrderOpenPrice() - Ask )/_Point) < 350 )
)
{
TP_TMP = NormalizeDouble(( OrderOpenPrice() + 500*_Point ),5 );
if( OrderTakeProfit() != TP_TMP )
{
if(OrderModify(OrderTicket(),OrderOpenPrice(), OrderStopLoss() , TP_TMP ,0,White)){}
if(OrderSelect(OrdersTotal()-1,SELECT_BY_POS)){};
double last_price = OrderLots();
if(OrderSend(_Symbol,OP_SELLLIMIT , NormalizeDouble( last_price ,2 ) ,TP_TMP,3, 0, 0 ,"tinyurl.com/ea5678" ,0,0,Red)){}
}
}
} // if( OrderType() == OP_BUY )
if( OrderType() == OP_SELL )
{
if(
( (( Bid - OrderOpenPrice() )/_Point) >= 300 )
&& ( (( Bid - OrderOpenPrice() )/_Point) < 350 )
)
{
TP_TMP = NormalizeDouble(( OrderOpenPrice() - 500*_Point ),5 );
if( OrderTakeProfit() != TP_TMP )
{
if(OrderModify(OrderTicket(),OrderOpenPrice(), OrderStopLoss() , TP_TMP ,0,White)){}
if(OrderSelect(OrdersTotal()-1,SELECT_BY_POS)){};
double last_price2 = OrderLots();
if(OrderSend(_Symbol,OP_BUYLIMIT , NormalizeDouble( last_price2 ,2 ) ,TP_TMP,3, 0, 0 ,"tinyurl.com/ea5678" ,0,0,DeepSkyBlue)){}
}
}
} // if( OrderType() == OP_SELL )
}
}
}
// Then you call the function Modify_TP();
</textarea><br />
----------------------------------
<br />
Open a buy limit sell limit order:
<textarea style="height: 120px; width: 670px;">
if(OrderSend(_Symbol,OP_BUYLIMIT , NormalizeDouble( buyLot ,2 ) ,D45RecentBarHighest8,3, SL_TMP,TP_TMP,"tinyurl.com/swfrx" ,0,0,DeepSkyBlue)){}
if(OrderSend(_Symbol,OP_SELLLIMIT , NormalizeDouble( sellLot ,2 ) ,D45RecentBarHighest8,3, SL_TMP,TP_TMP ,"sweetgirlforex" ,0,0,Red)){}
</textarea><br />
----------------------------------
<br />
Do something only if order is opened successfully?
<textarea style="height: 120px; width: 670px;">
int sellCheck1 = OrderSend(_Symbol,OP_SELLLIMIT , NormalizeDouble( sellLot ,2 ), ighest1,3, SL_TMP, TP_TMP, "1" ,0,0,Red)
if(sellCheck1 > 0)
{
oldSellEntry = 555;
}
</textarea><br />
----------------------------------
<br />
How to Substract 1 day? How to compare 2 dates?
<textarea style="height: 120px; width: 670px;">
input datetime Date1 = D'00:00';
if((TimeDay(Date1 - 1 )) == TimeDay(TimeCurrent()) && (TimeMonth(Date1)) == TimeMonth(TimeCurrent()) && (TimeYear(Date1)) == TimeYear(TimeCurrent())){
if(Hour()+5 == 23 && kam11 == "buy" && Bars != ThisBarTrade){
openBuyOrder();
}
}
</textarea><br />
----------------------------------
<br />
Get previous buy and sell order lot size :
<textarea style="height: 600px; width: 670px;">
double last_buy_lot = Start_Lot_Size;
double last_sell_lot = Start_Lot_Size;
datetime last_buy_time;
datetime last_sell_time;
int MagicNumber=1089731;
for(int i = OrdersTotal()-1; i>=0; i--)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES) == true)
{
// match the symbol EUR/USD or EUR/CHF, etc
if ( OrderSelect(i, SELECT_BY_POS,MODE_TRADES) // Only my orders w/
&& OrderSymbol() == Symbol()
&& OrderType()==OP_BUY
&& (OrderMagicNumber()==MagicNumber)
){
if (OrderOpenTime() > last_buy_time)
{
last_buy_lot = OrderLots();
last_buy_time=OrderOpenTime();
}
}
if ( OrderSelect(i, SELECT_BY_POS,MODE_TRADES) // Only my orders w/
&& OrderSymbol() == Symbol()
&& OrderType()==OP_SELL
&& (OrderMagicNumber()==MagicNumber)
){
if (OrderOpenTime() > last_sell_time)
{
last_sell_lot = OrderLots();
last_sell_time=OrderOpenTime();
}
}
}
}
</textarea><br />
----------------------------------
<br />
mql4 check if orderopentime() is today date?
<textarea style="height: 330px; width: 670px;">
if(Total_sell_pos() > 0)
{
for (int mn=OrdersTotal(); mn>=0; mn--)
{
if ( OrderSelect(mn, SELECT_BY_POS,MODE_TRADES) // Only my orders w/
&& (OrderSymbol() == Symbol()) && OrderMagicNumber()==MagicNumber
&& (OrderType()==OP_SELL)
){
if(TimeDayOfWeek(OrderOpenTime() ) != TimeDayOfWeek(TimeCurrent() )) // or TimeDayOfYear
{
CloseBuyOrders2();
CloseSellOrders2();
}
}
}
}
</textarea><br />
----------------------------------
<br />
Check 3 candles start hour of the day :
<textarea style="height: 1100px; width: 670px;">
input int InpTimeStartHour=0;
input int InpTimeStartMinute=0;
string getFirst3Candle()
{
double barClose;
double barOpen;
double barClose2;
double barOpen2;
double barClose3;
double barOpen3;
int BullCount = 0;
int BearCount = 0;
string bearBull="None";
//check if first candle (zero-current) is after 1.00am
datetime lastCandle=iTime(Symbol(),0,1);
if(TimeHour(lastCandle)<InpTimeStartHour ||
(TimeHour(lastCandle)==InpTimeStartHour && TimeMinute(lastCandle)<InpTimeStartMinute)
)
{
}else{
//looking for that time candle starting from day start
datetime todayStart=iTime(Symbol(),PERIOD_D1,0);
int shift=iBarShift(Symbol(),0,todayStart);
for(int i=shift;i>0;i--)
{
datetime iCandleTime=iTime(Symbol(),0,i);
if((TimeHour(iCandleTime)==InpTimeStartHour || TimeHour(iCandleTime)==InpTimeStartHour+1) &&
TimeMinute(iCandleTime)==InpTimeStartMinute)
{
barClose=iClose(Symbol(),0,i);
barOpen=iOpen(Symbol(),0,i);
barClose2=iClose(Symbol(),0,i+1);
barOpen2=iOpen(Symbol(),0,i+1);
barClose3=iClose(Symbol(),0,i+2);
barOpen3=iOpen(Symbol(),0,i+2);
if(barClose > barOpen){
BullCount = BullCount + 1;
}else if(barClose < barOpen){
BearCount = BearCount + 1;
}
if(barClose2 > barOpen2){
BullCount = BullCount + 1;
}else if(barClose2 < barOpen2){
BearCount = BearCount + 1;
}
if(barClose2 > barOpen2){
BullCount = BullCount + 1;
}else if(barClose2 < barOpen2){
BearCount = BearCount + 1;
}
if(BullCount > BearCount){
bearBull="Bull";
}else if(BullCount < BearCount){
bearBull="Bear";
}else{
bearBull="None";
}
return(bearBull);
}
}
}
return(bearBull);
}
</textarea><br />
----------------------------------
<br />
OrderSend Error 130 :<br/>
When Ask > buy entry, only can modify SL to above entry, cannot modify TP to nearer entry.<br/><br/>
----------------------------
<br/><br/>
3x next Bar count only will entry again.<br/>
&& Bars > ThisBarTrade+4 <br/><br/>
----------------------------zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-71179142640960142572021-10-14T05:44:00.000+08:002021-10-14T05:44:13.333+08:00Cannot connect Wifi / Wifi is disabled by windows mobility centerThere are 5 solutions :<br/>
1) Go to Network & Internet Setting > Airplane Mode > Slide on the "WI-FI". If cannot slide on, then :<br/><br/>
2) You need to press the "wifi" switch button on keyboard, if there is no wifi button on keyboard, then you need to download software to switch Wifi on. Go to your laptop brand website download Network Connection manager. Example if HP brand, then go download HP Connection Manager. Open it > Preference > Device Power > Check both option as picture below :<br/>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_zNzTYuwKDs2Do6LPatGFyuq6qkWyJygH2iU6m5h3i1dt5Xokii2tkmATRmB2W8s0sWCRqn19Kai7gManJCidgkU5D-IZhnk9IdcdW2a3hBSesroTXU0FcGOxrHVAlfjzJmMVmWezWm9z/s580/image+%252830%2529.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="600" data-original-height="400" data-original-width="580" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_zNzTYuwKDs2Do6LPatGFyuq6qkWyJygH2iU6m5h3i1dt5Xokii2tkmATRmB2W8s0sWCRqn19Kai7gManJCidgkU5D-IZhnk9IdcdW2a3hBSesroTXU0FcGOxrHVAlfjzJmMVmWezWm9z/s600/image+%252830%2529.jpg"/></a></div><br/><br/>
3)After Done Step 2, then restart computer. Then try to do step 1 again, hope success slide on on "WI-FI" for this time. If cannot slide on, then :
<br/><br/>
4) Window Search and open "Windows Mobilility Center" > swith on WIFI.<br/><br/>
zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-40986669200358777902021-10-03T01:36:00.003+08:002021-10-16T18:35:28.858+08:00The Best Forex EA year 2021<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgdze9uV2H5ZZoVhkPrhuktYMT-yenW8IcRzpBvT02U8QRVGthJQhTe6wrhlGA6u1Pz3U4_CgrmLrQHXOn821z95PgjHFiBTqlEthol_HhMN0_d5_BzR6j8miZwqKdwkYvK27b6Y3HuoXM/s661/600+profit+forex+ea+feature+image.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="670" data-original-width="661" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgdze9uV2H5ZZoVhkPrhuktYMT-yenW8IcRzpBvT02U8QRVGthJQhTe6wrhlGA6u1Pz3U4_CgrmLrQHXOn821z95PgjHFiBTqlEthol_HhMN0_d5_BzR6j8miZwqKdwkYvK27b6Y3HuoXM/s670/600+profit+forex+ea+feature+image.jpg"/></a></div><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYQZw6WyEWNMyE_rf0MrdMJIHPGxekPXo8wUW5XtynXE07a1-tcT0ufq5I632dnL9Z1F1SRR_TBE3kDGoWR3dPOigtignUXTMWdoXs-4GUELFXfYSnD4XnD0hoNaZ0Q7tqcqZLVBSABnKu/s906/600EA-installtion-step2.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="670" data-original-width="906" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYQZw6WyEWNMyE_rf0MrdMJIHPGxekPXo8wUW5XtynXE07a1-tcT0ufq5I632dnL9Z1F1SRR_TBE3kDGoWR3dPOigtignUXTMWdoXs-4GUELFXfYSnD4XnD0hoNaZ0Q7tqcqZLVBSABnKu/s670/600EA-installtion-step2.jpg"/></a></div>
<a name='more'></a>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitocLfGqbjhbZ1z8g9aJo20Vw990_dJX4bwBgNe908bJLbupHFB7ULAW4B-P-euEfRRjWnRFoXn8EgkufxGZOG7eBU3IV_T1N29WS4YXtFFjC1AjIkwM-xwjpLxhxWWoOMkwMQ5zotZddC/s738/600EA-installtion-step1.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="670" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitocLfGqbjhbZ1z8g9aJo20Vw990_dJX4bwBgNe908bJLbupHFB7ULAW4B-P-euEfRRjWnRFoXn8EgkufxGZOG7eBU3IV_T1N29WS4YXtFFjC1AjIkwM-xwjpLxhxWWoOMkwMQ5zotZddC/s670/600EA-installtion-step1.jpg"/></a></div><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWms_7av2tpvQRwEG7AN0Zzxa2Hv_JqWt7syP382l4qdGp2onQqEOkYZ-OPjCAI0xeD3FGgJsMt1mG_dOYCxpVSg-vNWWaMRBAouRiawVl-dePITQVCieuYlqSBsmUlP80UN_scs5d9gOf/s1141/600+profit+forex+ea+3.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="670" data-original-width="1141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWms_7av2tpvQRwEG7AN0Zzxa2Hv_JqWt7syP382l4qdGp2onQqEOkYZ-OPjCAI0xeD3FGgJsMt1mG_dOYCxpVSg-vNWWaMRBAouRiawVl-dePITQVCieuYlqSBsmUlP80UN_scs5d9gOf/s670/600+profit+forex+ea+3.jpg"/></a></div><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4hNccxWsTm1_f2KWoDCMKkp9xCFISHk6J0k3Ix03Z2hKcMFmTGFpowFdkdSwizywJ-t2_g3HmYqUBrJdLgDIi_hooKOcAOfqsulJdXNC83CPFCf5OskmIkIjeF0DmKt8Y3l1GH_gopcXF/s1366/600+profit+forex+ea+2.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="670" data-original-width="1366" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4hNccxWsTm1_f2KWoDCMKkp9xCFISHk6J0k3Ix03Z2hKcMFmTGFpowFdkdSwizywJ-t2_g3HmYqUBrJdLgDIi_hooKOcAOfqsulJdXNC83CPFCf5OskmIkIjeF0DmKt8Y3l1GH_gopcXF/s670/600+profit+forex+ea+2.jpg"/></a></div><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihFTuBz2r93oG4I9FO_cprHVxnge1u9BhVH9T-LHTPgYLnNDf45i03Yc3ettuyli5hWg7fvINlEaCCYrWe1w0UaJg4FB3V_8E9YmQ8T2vqDnclXm6sO3XCVbLjQzZpi6p_nAmVpkXDA50p/s1275/600+profit+forex+ea+4.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="670" data-original-width="1275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihFTuBz2r93oG4I9FO_cprHVxnge1u9BhVH9T-LHTPgYLnNDf45i03Yc3ettuyli5hWg7fvINlEaCCYrWe1w0UaJg4FB3V_8E9YmQ8T2vqDnclXm6sO3XCVbLjQzZpi6p_nAmVpkXDA50p/s670/600+profit+forex+ea+4.jpg"/></a></div>
This E.A made 600% profit within 2 months.<br/><br/>
Video instruction to install and setup this EA Robot :<br/>
<a target="_blank" href="https://www.youtube.com/watch?v=2aU47eaoQ3U">https://www.youtube.com/watch?v=2aU47eaoQ3U</a><br/><br/>
Don't forget to set swap free, instruction video at :<br/>
<a target="_blank" href="https://www.youtube.com/watch?v=YfqtMpCu4ok">https://www.youtube.com/watch?v=YfqtMpCu4ok</a><br/><br/>
Download this E.A file and setting file from the following link :<br/>
<a target="_blank" href="https://tinyurl.com/2jumEA">https://tinyurl.com/2jumEA</a><br/>
OR<br/>
<a target="_blank" href="https://bit.ly/3tbE9c8">https://bit.ly/3tbE9c8</a><br/>
------------------------------------------<br/>
FBS MT4 broker :<br/>
1) Legit with International License,<br/>
2) Low spread,<br/>
3) No commission charged,<br/>
4) No swap fee,<br/>
5) Cent Account (USD20 = USD2000)<br/>
6) Leverage 1:1000<br/>
My FBS affiliate link :<br/>
<a target="_blank" href="https://fbs.com/?ppk=SweetGirlForex">https://fbs.com/?ppk=SweetGirlForex</a><br/>
You will get 100% bonus if register through my affiliate link.<br/>
For example, you deposit usd50, u get usd50 bonus. So total you get USD100 in your MT4 account.<br/>
--------------------------------------------<br/><br/>
zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-48338680029842360282021-09-28T13:36:00.020+08:002021-10-02T19:56:02.384+08:00How to change theme design template for existing php website?Steps :<br/>
1) Upload new design template folder and file to hosting/server.<br/>
- Do NOT overwrite existing folder, just upload the new file to existing folder.<br/>
- If same name file, then rename old file by adding -old behind.<br/><br/>
2) Test upload and open a html front page see if all image, design no missing and right click select "inspect" in chrome to check console got error.<br/><br/>
3) (Please DON'T do this step 3, i show step 3 is just because worry you forget and stupid doing step 3).<br/>
Move files to deeper folder Eg. FROM :<br/>
test.hyperspace.today/asset/img<br/>
TO:<br/>
test.hyperspace.today/application/views/themes/defaults/assets_web/img<br/><br/>
4) After move file at step 3, if u can't browse the page, solution is at step 5.<br/><br/>
5) Solution for step 4 is You need to do 3 things :<br/>
a) rename file extension from .html to .php<br/>
b) Controller/Hungry create function contactus(){ to load the view from the new file contactus.php<br/>
c) config/route.php add $route['contactus'] = "hungry/contactus";<br/><br/>
6) Focus on edit homepage now. Clone new design index.html file and rename 1 to menu-2.php and upload it to server.<br/><br/>
7) at Controller/Hungry.php edit function menu() load view to menu-2.php (comment out the original load view code)<br/><br/>
8) Replace the new design content to real content. Eg, username, sidebar menu, wallet name and amount.<br/><br/>
Bug : Bootstrap Modal cannot close.<br/>
make sure dont have repeating the same id of div in two files :<br/>
1) modal_view_tree_member_data.php<br/>
2) dashboard.php<br/>
Then if using bootstrap v5 instead of v4, solution :<br/>
<textarea style="height: 140px; width: 670px;">
New Way
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
Old Way
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close"></button>
</textarea><br />
----------------------------------
<br />
Bug : Boostrap 5 Modal cannot open.<br/>
Solution : Change data-toggle="modal" data-target="#lostpassword" TO :<br/>
data-bs-toggle="modal" data-bs-target="#lostpassword"<br/><br/>
Cannot find jquery function or javascript function is from which .js file?<br/>
Solution : right click the webpage, select "Page Source", then click each .js link to open it. Then press CTRL + F to find the keyword.<br/><br/>zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-75039368314218514942021-09-09T10:45:00.051+08:002021-10-02T03:09:23.193+08:00Bhojon Modification Documentation1) Add new line codes in .htaccess file :
<textarea style="height: 100px; width: 670px;">
RewriteCond %{HTTP_HOST} test.hyperspace\.today [NC]
RewriteCond %{REQUEST_URI} ^/$
Rewriterule ^(.*)$ https://test.hyperspace.today/menu [L,R=301]
Redirect /home /menu
</textarea><br />
----------------------------------
<br />
2) Edit the link url on .htaccess file.<br/><br/>
Home page keep jump to admin login page problem :<br/>
3) Login to Admin panel > Web Setting > Common Setting > Website On > Save.<br/><br/>
4) Add Food Category with picture from Admin panel.<br/><br/>
5) Add Food with picture from Admin panel.<br/><br/>
6) Add Food Variant from Admin panel.<br/><br/>
7) Add /** Zac Edit Start Here **/ CSS code to <br/>
application/views/themes/defaults/assets_web/css/custome.css <br/><br/>
8) Copy paste all code in app.hyperspace.today/application/views/themes/defaults/menu.php<br/><br/>
9) Copy paste all code in app.hyperspace.today/application/views/themes/defaults/reservation.php<br/><br/>
10) Copy paste all code in app.hyperspace.today/application/views/themes/defaults/index.php<br/><br/>
11) Add banner from Admin panel.<br/><br/>
12) Upload Footer Menu image at app.hyperspace.today/assets/img/icons.<br/><br/>
13) To modify url login to admin-login :
<textarea style="height: 390px; width: 670px;">
1) Edit application/config/routes.php:
$route['login'] = "dashboard/auth/index";
TO :
$route['admin-login'] = "dashboard/auth/index";
2) Edit application/modules/dashboard/controllers/Auth.php
redirect('login');
To :
redirect('admin-login');
3) Edit application/modules/template/controllers/Template.php
$this->load->view('login', $data);
To :
$this->load->view('admin-login', $data);
4) Rename
application/modules/template/views/login.php
To :
application/modules/template/views/admin-login.php
5) application/modules/template/views/admin-login.php
echo form_open('login','id="loginForm" novalidate');
To :
echo form_open('admin-login','id="loginForm" novalidate');
</textarea><br />
----------------------------------
<br />
14) Import database tbl language from id 1805 (restaurant). Steps :<br />
select records from id 1805 onward > Export > Custom > Only Data (No need change Rows numbers field)<br /><br />
15) Add Cash Wallet and Point Wallet into Table Payment_Method.<br /><br />
16) import tbl_ewallet from previous project.<br /><br />
17) Move php function from old project library/common.php to new project library/common.php<br/>
Previous project code : $query=$this->CI->db->query($q);<br/>
Solution : Remove "CI"<br/>
on Controller/Xxxx.php add $this->load->library('Common');<br/><br/>
18) Add Wallet to Admin manage_member page : <br/>
application/modules/setting/views/customerlist.php
<textarea style="height: 100px; width: 670px;">
line 138 : <th><?php echo display('wallet') ?></th>
Database query : INSERT INTO `language` (`id`, `phrase`, `english`, `spanish`, `turkish`, `taiwan`) VALUES (NULL, 'wallet', 'Wallet', NULL, NULL, '钱包');
</textarea><br />
----------------------------------
<br />
19) Copy paste constant.php from old to new project.<br/><br/>
20) fix admin sidebar is not active on admin manual credit member wallet page by javascript:<br/>
<textarea style="height: 300px; width: 670px;">
<script>
$(document).ready(function() {
var url = window.location.pathname;
var segments = url.split( '/' );
var module = segments[1];
var controller = segments[2];
var method = segments[3];
//alert($.trim(method));
if(method == "e_wallet")
{
$('#'+module).addClass('active');
$('#customertype').addClass('active');
$('#customerlist').addClass('active');
}
});
</script>
</textarea><br />
----------------------------------
<br />
21) If 403 error or ajax error, then go to config.php turn false ALL $config['csrf_protection'] = FALSE;<br /><br />
22) agent1 stuck at login page, so go to application/modules/setting/controllers/Language.php
<textarea style="height: 200px; width: 670px;">
replace :
if (!$this->session->userdata('isAdmin'))
To :
$uri_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$uri_segments = explode('/', $uri_path);
$pageurl = $uri_segments[1];
if (!$this->session->userdata('isAdmin') && $pageurl == "admin-login")
</textarea><br />
----------------------------------
<br />
23)Add this sql to database :<br/>
<textarea style="height: 90px; width: 670px;">
INSERT INTO `language` (`id`, `phrase`, `english`, `taiwan`) VALUES (NULL, 'cash_wallet_report', 'Cash Wallet Report', '现金钱包报告'), (NULL, 'point_wallet_report', 'Point Wallet Report', '现金钱包报告');
</textarea><br />
----------------------------------
<br />
24) Create sidebar menu : cash_wallet_report and point_wallet_report at : application/modules/template/views/includes/sidebar.php<br/>
if not show label of the sidebar menu, then add in tbl_language as point (23)<br/><br/>
25) replace login.php to admin-login.php at : application/modules/setting/controllers/Setting.php<br/><br/>
26) add the following code to : application/modules/report/controllers/Reports.php
<textarea style="height: 50px; width: 670px;">
$this->load->library('Common');
</textarea><br />
----------------------------------
<br />
27) Copy 2 functions report_wallets() and report_wallets_ajax from old project application/controllers/secure/Transaction_report.php to new project application/modules/report/controllers/Reports.php<br/><br/>
28) Copy paste php file from old project shop.aegis2u.com/application/views/secure/report_wallets.php to new project application/modules/report/views/report_wallets.php<br/><br/>
29) Add point to food variant table by sql :
<textarea style="height: 50px; width: 670px;">
ALTER TABLE `variant` ADD `point` INT(5) NOT NULL AFTER `price`;
</textarea><br />
----------------------------------
<br />
30) Add point label to Language table by sql :
<textarea style="height: 50px; width: 670px;">
INSERT INTO `language` (`id`, `phrase`, `english`, `taiwan`) VALUES (NULL, 'point', 'Point', '积分');
</textarea><br />
----------------------------------
<br />
31) search keyword "price" and add "point" below it for 3 pages :<br />
a) application/modules/itemmanage/controllers/Item_food.php<br />
b) application/modules/itemmanage/views/varientlist.php<br />
c) application/modules/itemmanage/views/varientedit.php<br /> <br />
32) add lable cash wallet and point wallet to table Language by sql :
<textarea style="height: 80px; width: 670px;">
INSERT INTO `language` (`id`, `phrase`, `english`, `spanish`, `turkish`, `taiwan`) VALUES (NULL, 'cash wallet', 'Cash Wallet', NULL, NULL, '现金钱包'), (NULL, 'point wallet', 'Point Wallet', NULL, NULL, '积分钱包');
</textarea><br />
----------------------------------
<br />
33) Copy paste the following code from old project controller/Dashboard.php to new project controller/Hungry.php
<textarea style="height: 80px; width: 670px;">
$data['total_cash'] = $this->common->getCashBalance(....
$data['total_point'] = $this->common->getCoinBalance(....
</textarea><br />
----------------------------------
<br />
34) Copy paste the following 4 functions from old projects Controller/Wallets.php to new project controller/Hungry.php :<br />
a) function cash_wallet()<br />
b) function cash_wallet_ajax()<br />
c) function coin_wallet()<br />
d) function coin_wallet_ajax()<br /> <br />
35) add "public" before "function" at point (34) a,b,c,d.<br /> <br />
36) find keyword "$this->session->userdata('WDW_MEMBER_LOGIN_ID')" and replace it with $islogin and add declaration : $islogin = $this->session->userdata('CusUserID');<br /> <br />
37)
<textarea style="height: 180px; width: 670px;">
Replace :
$this->load->view('member/cash_wallet', $data);
To :
$data['content'] = $this->load->view('themes/' . $this->themeinfo->themename . '/cash_wallet', $data, TRUE);
$this->load->view('themes/' . $this->themeinfo->themename . '/index', $data);
</textarea><br />
----------------------------------
<br />
38) find keyword "coin" replace it to "Point".<br /> <br />
39) upload Datapicker folder from old project assets/admin/js/plugins/datapicker<br /> <br />
40) I have delete 90% codes at application/views/themes/defaults/cartitem.php<br />
So if found any bug on shopping cart, then have to copy paste the code back from org.hyperspace.com AND<br />
function addtocartitem(pid, id, type) at application/views/themes/defaults/assets_web/js/default_theme.js<br /><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-3280300257847146032021-09-05T07:24:00.002+08:002021-09-05T07:24:48.612+08:00Laravel TutorialIf have problem, besides google search, u may search in laravel documentation : https://laravel.com/docs/8.x <br/><br/>zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-64377278594299427132021-08-27T14:40:00.056+08:002021-11-05T12:46:49.214+08:00Bhojon CodeIgniter TutorialIf logs folder don't show error file :<br/>
Go to config.php edit :
<textarea style="height: 50px; width: 670px;">
$config['log_threshold'] = 1;
</textarea><br />
----------------------------------
<br />
To modify url login to admin-login :
<textarea style="height: 390px; width: 670px;">
1) Edit application/config/routes.php:
$route['login'] = "dashboard/auth/index";
TO :
$route['admin-login'] = "dashboard/auth/index";
2) Edit application/modules/dashboard/controllers/Auth.php
redirect('login');
To :
redirect('admin-login');
3) Edit application/modules/template/controllers/Template.php
$this->load->view('login', $data);
To :
$this->load->view('admin-login', $data);
4) Rename
application/modules/template/views/login.php
To :
application/modules/template/views/admin-login.php
5) application/modules/template/views/admin-login.php
echo form_open('login','id="loginForm" novalidate');
To :
echo form_open('admin-login','id="loginForm" novalidate');
</textarea><br />
----------------------------------
<br />
Edit CSS at :<br/>
application/views/themes/defaults/assets_web/css/style.css but better edit in custom.css because when update version, style.css will be replaced by new file.<br/><br/>
Edit languages at :<br/>
database table language<br/><br/>
Common.php file contain all common functions is at : <br/>
application/models/Hungry_model.php<br/><br/>
Home page controller/Home.php is at :<br/>
application/controllers/Hungry.php<br/><br/>
Edit header and footer is at :<br/>
application/views/themes/defaults/index.php<br/><br/>
Syntac replacement :<br/>
$data['form_data']= $this->common->getAllRec("*","tbl_manage_announcement","WHERE status = 1 Order By id DESC");<br/>
$data['paymentinfo'] = $this->hungry_model->read_all('*', 'payment_method', 'payment_method_id', '', 'is_active', '1');<br/><br/>
Exception: Call to a member function query() on null<br/>
Previous project code : $query=$this->CI->db->query($q);<br/>
Solution : Remove "CI"<br/><br/>
How to call function from controller to view page?<br/>
<textarea style="height:250px; width: 670px;">
At application/controllers/Hungry.php :
public function checkout()
{
$data['test'] = $this->test2();
}
public function test2()
{
return "ass";
}
At application/views/themes/defaults/checkout.php :
<?php echo $test; ?>
</textarea><br />
----------------------------------
<br />
Admin header, sidebar, footer is at : <br/>
1) application/modules/template/views/includes/header.php <br/>
2) application/modules/template/views/layout.php <br/>
3) At Controllers/Xxx.php file replace :
<textarea style="height:120px; width: 670px;">
$this->load->view('setting/member_e_wallet', $data);
to
$data['module'] = "setting";
$data['page'] = "member_e_wallet";
echo Modules::run('template/layout', $data);
</textarea><br />
----------------------------------
<br />
Admin sidebar is not active, go to application/modules/template/views/includes/sidebar.php :<br/>
<textarea style="height: 300px; width: 670px;">
<script>
$(document).ready(function() {
var url = window.location.pathname;
var segments = url.split( '/' );
var module = segments[1];
var controller = segments[2];
var method = segments[3];
//alert($.trim(method));
if(method == "e_wallet")
{
$('#'+module).addClass('active');
$('#customertype').addClass('active');
$('#customerlist').addClass('active');
}
});
</script>
</textarea><br />
----------------------------------
<br />
If css disappear, then go to contoller file edit :<br/>
<textarea style="height:120px; width: 670px;">
$this->load->view('setting/member_e_wallet', $data);
to
$data['module'] = "setting";
$data['page'] = "member_e_wallet";
echo Modules::run('template/layout', $data);
</textarea><br />
----------------------------------
<br />
If admin-agent cannot login, go to admin panel > user > edit user > uncheck "Is Monitor Display". <br/><br/>
If side bar menu is not show, then add in tbl_language.<br/><br/>
If 500 error or Call to a member function getAllRec() on null, meaning cannot read Common.php file, so add the following code to the controller file :
<textarea style="height: 50px; width: 670px;">
$this->load->library('Common');
</textarea><br />
----------------------------------
<br />
How to move Controller file from old project to new project?<br />
1) Copy paste the following 4 functions from old projects Controller/Wallets.php to new project controller/Hungry.php :<br />
a) function cash_wallet()<br />
b) function cash_wallet_ajax()<br />
c) function coin_wallet()<br />
d) function coin_wallet_ajax()<br /> <br />
2) add "public" before "function" at point (34) a,b,c,d.<br /> <br />
3) find keyword "$this->session->userdata('WDW_MEMBER_LOGIN_ID')" and replace it with $islogin and add declaration : $islogin = $this->session->userdata('CusUserID');<br /> <br />
4)
<textarea style="height: 180px; width: 670px;">
Replace :
$this->load->view('member/cash_wallet', $data);
To :
$data['content'] = $this->load->view('themes/' . $this->themeinfo->themename . '/cash_wallet', $data, TRUE);
$this->load->view('themes/' . $this->themeinfo->themename . '/index', $data);
</textarea><br />
----------------------------------
<br />
How to move View file from old project to new project? 7 steps :<br />
1) Copy paste entire code from old project file to new project file.<br />
2) Delete all codes above the following code line : <br />
<textarea style="height: 40px; width: 670px;">
<div class="row">
</textarea><br />
----------------------------------
<br />
3) make sure close div is the same number as open div (tips : just count vertical line from left side). Delete all extra div close at bottom<br /><br />
4) Visit member site to find out which page is the same template u want to copy (want side menu?), if want side menu then may copy my_profile page template. Copy all div class from there.<br /><br />
5) Find keyword "member/" and replace it with correct file path, eg :
<textarea style="height: 40px; width: 670px;">
site_url('hungry/wallets/cash_wallet');
</textarea><br />
6) application/config/routes.php add :
<textarea style="height: 40px; width: 670px;">
$route['cash_wallet'] = "hungry/cash_wallet";
</textarea><br />
7) include datatable css and javascript to application/modules/template/views/includes/head.php :
<textarea style="height: 100px; width: 670px;">
<link href="<?php echo base_url('assets/datatables/css/dataTables.min.css') ?>" rel="stylesheet" type="text/css"/>
<script src="<?php echo base_url('assets/datatables/js/dataTables.min.js') ?>" type="text/javascript"></script>
</textarea><br />
----------------------------------
<br />
TypeError: $(...).DataTable is not a function , solution :<br/>
There could be 3 reasons for this error :<br/>
1) jQuery DataTables library is missing.<br/>
2) jQuery library is loaded after jQuery DataTables.<br/>
3) Multiple versions of jQuery library is loaded.<br/>
SOLUTION at point (7) above.<br/><br/>
Those errors are because you didn't include inc_footer.php :<br/>
1) checkboxlist_all_new error<br/>
2) status active inactive toogle error<br/>
3) change_status error<br/>
4) delete_all error<br/>
<textarea style="height: 60px; width: 670px;">
<?php $this->load->view('themes/' . $this->themeinfo->themename . '/inc_footer'); ?>
</textarea><br />
----------------------------------
<br />
Cannot upload photo / payment resit <br/>
OR<br/>
error --> Exception: Call to a member function initialize()<br/>
Solution is to load "upload" library at Config/autoload.php OR put the following code on the error page :<br/>
$this->load->library('upload');<br/><br/>
can't submit form on bootstrap popup model, so must use javascript to submit form:
<textarea style="height: 280px; width: 670px;">
<div class="modal-footer">
<button onclick="form_submit()" name='sb_btn' class="btn btn-danger">Submit</button>
</div>
</form>
<script type="text/javascript">
function form_submit() {
if($('#payment_slip').get(0).files.length != 0))
{
document.getElementById("package_step_form").submit();
}
}
</script>
</textarea><br />
----------------------------------
<br />
How to copy paste library/Common_model.php from old project to new project?<br />
Solution : copy the inside codes functions from old Common_model.php to new Hungry_model.php<br /> <br />
Error :<br/>
1) 500<br/>
2) Unable to load the requested file: member/inc_footer.php<br/>
3) The path to the image is not correct.<br/>
4) Your server does not support the GD function required to process this type of image.<br/>
Solution :
<textarea style="height: 140px; width: 670px;">
Replace :
<?php $this->load->view('member/inc_footer'); ?>
To :
<?php $this->load->view('themes/' . $this->themeinfo->themename . '/inc_footer'); ?>
</textarea><br />
----------------------------------
<br />
How to apply jquery function from old project form to new project form?
<textarea style="height: 180px; width: 670px;">
Replace :
<form id="member_registration_form" action="<?php echo site_url('register'); ?>" method="post">
To :
<?php
$attributes = array('class' => 'row', 'id' => 'member_registration_form');
echo form_open_multipart('hungry/submitregister',$attributes)
?>
</textarea><br />
----------------------------------
<br />
500 ERROR might because database query syntac error, or wrong field name in database.<br/><br/>
Cannot find jquery function or javascript function is from which .js file?<br/>
Solution : right click the webpage, select "Page Source", then click each .js link to open it. Then press CTRL + F to find the keyword.<br/><br/>
javascript function addonsitem() and addtocartitem() is at application/views/themes/defaults/assets_web/js/default_theme.js<br/><br/>
ERRORS :
<textarea style="height: 130px; width: 670px;">
Uncaught SyntaxError: Unexpected token '<' showljslang
Uncaught SyntaxError: Unexpected token '<' basicjs:1
Solution : Edit php file application/modules/ordermanage/controllers/Order.php
Remove this line of code :
if (!$this->session->userdata('isLogIn'))
redirect('admin-login');
</textarea><br />
----------------------------------
<br />
$this->session->set_flashdata not showing.
Solution : Add the following code inside div id="content"
<textarea style="height: 360px; width: 670px;">
<?php if ($this->session->flashdata('message')) { ?>
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<?php echo $this->session->flashdata('message') ?>
</div>
<?php } ?>
<?php if ($this->session->flashdata('exception')) { ?>
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<?php echo $this->session->flashdata('exception') ?>
</div>
<?php } ?>
<?php if (validation_errors()) { ?>
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<?php echo validation_errors() ?>
</div>
<?php } ?>
</textarea><br />
----------------------------------
<br />
Book table check available codes at : application/models/Hungry_model.php<br />
function checkavailtable()<br /><br />
table reservation flow :<br />
reservation-2.php > hungry/reservation > hungry/checkavailablity > checkavail.php > default_theme.js/editreserveinfo() > hungry/reservationform > reservationform.php > hungry_model/checktable()/checkfree()/checkavailtable<br /><br />
Dont know which file to edit for Cart? cart->update() /cart->contents()?<br />
cart is class of Codeignitor, so you won't fine cart function. All variable save in array pass through jquery. So you just need to trace from menu-2.php form > jquery call php function in Hungry.php > view form...<br /><br />
shopping cart function related files :<br />
addonsitem.php<br />
cartlist.php<br />
cart-2.php<br />
default_theme.js<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /> zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-16899201710590670222021-08-22T00:57:00.011+08:002021-08-22T01:35:41.985+08:00Tonsil / Tonsilla swell and pain home remedies<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHIGVu-f6iQESoA7L-Z2pRKs9Xh2agggULdJ0tvfGg9MmMZjaynh9g_Gg9R6QOsn-zoeE1xF3uvs0Iq97SxD6zW0GdU4_xPCn-5vBe6wuC5RpNPSiZGw0sq6YuYhXgnmxYOBtm5_430PZW/s540/tonsillar.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="640" data-original-width="540" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHIGVu-f6iQESoA7L-Z2pRKs9Xh2agggULdJ0tvfGg9MmMZjaynh9g_Gg9R6QOsn-zoeE1xF3uvs0Iq97SxD6zW0GdU4_xPCn-5vBe6wuC5RpNPSiZGw0sq6YuYhXgnmxYOBtm5_430PZW/s640/tonsillar.jpg"/></a></div>
Steps to cure tonsil pain at home :<br/>
1) Keep drinking water so that tonsil is not dry. Tonsil will recovery fast if it is always mois by water.<br/><br/>
2) Brush when wake up and before sleep.<br/><br/>
3) When sleeping, side sleep, let tonsil pain side at downside, so that all saliva fall to tonsil. Saliva mois the tonsil because tonsil need to be mois only will recovery faster.<br/><br/>
4) Try to sleep before 10pm to 2am (because this 4 hours is the most healing time for body tisue).<br/><br/>
5) use air humidifier because when u breath in the air full of mois keep tonsil mois can recovery fast.<br/>
<a name='more'></a>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjutDdsxuTJBUo4LtDlGTIYH_cQnnFk1Tj5h0JFgIRVToR_T7WijlK0D3teOcVPrJ9VSYM75VblvajwEUL__P9dW1HFfxWSzmYCeq0dmVgc67xkL0b6Duq8gZQC3Rs3-n8wds6iFCix5Xwy/s800/air+humidifier.jpeg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-width="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjutDdsxuTJBUo4LtDlGTIYH_cQnnFk1Tj5h0JFgIRVToR_T7WijlK0D3teOcVPrJ9VSYM75VblvajwEUL__P9dW1HFfxWSzmYCeq0dmVgc67xkL0b6Duq8gZQC3Rs3-n8wds6iFCix5Xwy/s640/air+humidifier.jpeg"/></a></div><br/>
6) If you have habit always drink protein powder or milk everyday while doing gym, stop drinking protein before yout tonsil recovery, because protein powder make it worse.<br/><br/>
7) If 3 days still not recovery or not getting better, then try apply watermelon powder.<br/>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1TjlXQqNghUrwMngFAGgXkM0GXOurf7aX0556neIKpsixHSwpaXuv7zPQZwGondfxPrDuocfOXsCxgprQgLZBV_PtozwAmSEldJmvygLM8Jhw-bBKrz2CQEPVEU6vwQCaAT0i05tpAj38/s960/watermelon-powder.jpeg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" data-original-width="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1TjlXQqNghUrwMngFAGgXkM0GXOurf7aX0556neIKpsixHSwpaXuv7zPQZwGondfxPrDuocfOXsCxgprQgLZBV_PtozwAmSEldJmvygLM8Jhw-bBKrz2CQEPVEU6vwQCaAT0i05tpAj38/s640/watermelon-powder.jpeg"/></a></div><br/><br/>zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-83349347228470597822021-07-26T17:50:00.003+08:002021-07-26T17:50:28.465+08:00php array tutorialphp for loop add value into multidimensional array<br/>
<textarea style="height: 150px; width: 670px;">
$cto1_users_array = array();
$i=0;
foreach($lucky_winners As $lucky_user)
{
$cto1_users_array[$i]['userid'] = $lucky_user['user_id'];
$cto1_users_array[$i]['amount'] = $each_person_get;
$i++;
}
</textarea><br />
----------------------------------
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-89964895719945970622021-05-05T23:14:00.019+08:002021-05-05T23:28:56.400+08:00Web App PWA for CodeigniterStep 1 : Your website must be running on a secure domain (https).<br /><br />
Step 2 : Use <a href="http://realfavicongenerator.net/">realfavicongenerator.net</a> to generate all the necessary icons that will be used on different mobile devices, this platform will also generate the manifest.json file that you will need later.<br /><br />
Step 3 : Upload all icons and manifest.json from Step 2 above to file path assets/admin/images<br /><br />
Step 4 : Edit manifest.json file become look like :<br />
<textarea style="height: 380px; width: 670px;">{
"name": "Do Track",
"short_name": "DoTrack",
"start_url": "/index.php/secure/track_zc.html",
"icons": [
{
"src": "/assets/admin/images/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/assets/admin/images/android-chrome-384x384.png",
"sizes": "384x384",
"type": "image/png",
"purpose": "any maskable"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone",
"prefer_related_applications": false
}
</textarea><br /><br />
Step 5 : Application/Views/secure/inc_header.php file add the following code that generated from Step 2 just now :<br />
<textarea style="height: 250px; width: 670px;"><link rel="icon" sizes="192x192" href="<?php echo $this->common->auto_version(base_url('assets/admin/images/android-chrome-192x192.png')); ?>"> <!-- RECOMMENDED -->
<link rel="icon" sizes="128x128" href="<?php echo $this->common->auto_version(base_url('assets/admin/images/android-chrome-192x192.png')); ?>">
<link rel="apple-touch-icon" sizes="180x180" href="<?php echo $this->common->auto_version(base_url('assets/admin/images/apple-touch-icon.png')); ?>">
<link rel="icon" type="image/png" sizes="32x32" href="<?php echo $this->common->auto_version(base_url('assets/admin/images/favicon-32x32.png')); ?>">
<link rel="icon" type="image/png" sizes="16x16" href="<?php echo $this->common->auto_version(base_url('assets/admin/images/favicon-16x16.png')); ?>">
<link rel="manifest" href="<?php echo $this->common->auto_version(base_url('assets/admin/images/site.webmanifest')); ?>">
</textarea><br /><br />
Step 6 : Download upup.min.js file from <a href="https://github.com/TalAter/UpUp/raw/master/dist/upup.zip">https://github.com/TalAter/UpUp/raw/master/dist/upup.zip</a><br /><br />
Step 7 : Upload upup.min.js and upup.sw.min.js files to folder directory assets/admin/js.
<br /><br />
Step 8 : Edit upup.sw.min.js file, press control + F find keyword "sourceMappingURL". Edit it become //# sourceMappingURL=/assets/admin/js/upup.sw.min.js.map<br /><br />
Step 9 : Edit upup.min.js file, press control + F find keyword "sourceMappingURL". Edit it become //# sourceMappingURL=/assets/admin/js/upup.sw.min.js.map<br /><br />
Step 10 : Edit upup.min.js file, press control + F find keyword "service-worker-url". Edit it become service-worker-url":"/assets/admin/js/upup.sw.min.js<br /><br />
Step 10 : Application/Views/secure/inc_footer.php add the following code :<br />
<textarea style="height: 80px; width: 670px;"><script src="<?php echo $this->common->auto_version(base_url('assets/admin/js/upup.min.js')); ?>"></script>
</textarea><br /><br />
Step 11 : Edit the php page that you want PWA open at first page. (For example, My case Application/Views/Secure/track_wk.php) add the following code<br />
<textarea style="height: 120px; width: 670px;"><script>
UpUp.start({
'content': '<html><body><h1>Top Hotels in Rome</h1><p>Villa Domus</p><p>Hotel Trivelli</p></body></html>'
});
</script>
</textarea><br /><br />
Step 12 : Check if any bug by using the following 2 difference methods :<br />
a) google chrome browser open your website and right click on page and select "Inspect". Then follow instruction on the screenshot below :<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzibuM3kPtrX9QZXHUCDzohgMfnyx_QYjq03bfWVjRN1fedzmwFgNs6bmdBO4FBSvZKzE5kRPY8cJibcrZqkGoasTgtmOneyj58Y467DS9LbDhtiZDdhKuUrvgSJYQJ8dk_kAs54x2MH9W/s0/checkPWAbug.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img border="0" data-original-width="700" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzibuM3kPtrX9QZXHUCDzohgMfnyx_QYjq03bfWVjRN1fedzmwFgNs6bmdBO4FBSvZKzE5kRPY8cJibcrZqkGoasTgtmOneyj58Y467DS9LbDhtiZDdhKuUrvgSJYQJ8dk_kAs54x2MH9W/w700/checkPWAbug.jpg" width="700" /></a></div><br />
b) Using google chrome browser plugin "Lighthouse" or 3rd party website "WebPagetest Lighthouse Test" to check if any bug or error :
<a href="https://pwa-for-wp.com/docs/article/how-to-check-pwa-is-working-or-not/">https://pwa-for-wp.com/docs/article/how-to-check-pwa-is-working-or-not/</a><br /><br />
zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-45580611429306860472021-05-04T12:13:00.012+08:002021-05-05T19:13:22.745+08:00Creating Track page for WL and ZCController folder has 2 pages :<br/>
1) Track_wl.php<br/>
2) Trac_wl_hist.php<br/><br/>
View folder has 2 pages :<br/>
1) track_wl.php<br/>
2) trac_wl_hist.php<br/>
2) trac_wl_add.php<br/><br/>
asset/js folder has bootstrap-fullscreen-select.min.js<br/>
secure/inc_footer.php has :<br/>
<textarea style="height: 50px; width: 670px;">
<script src="<?php echo $this->common->auto_version(base_url('assets/admin/js/bootstrap-fullscreen-select.js')); ?>"></script>
</textarea>
<br/><br/>
asset/css folder has bootstrap-fullscreen-select.css<br/>
secure/inc_header.php has :<br/>
<textarea style="height: 50px; width: 670px;">
<link href="<?php echo $this->common->auto_version(base_url('assets/admin/css/bootstrap-fullscreen-select.css')); ?>" rel="stylesheet">
</textarea>
<br/><br/>
application/libaray/commond.php file has the code :<br/>
<textarea style="height: 600px; width: 670px;">
function secondsToTime($seconds)
{
$secondsInAMinute = 60;
$secondsInAnHour = 60 * $secondsInAMinute;
$secondsInADay = 24 * $secondsInAnHour;
// Extract days
$days = floor($seconds / $secondsInADay);
// Extract hours
$hourSeconds = $seconds % $secondsInADay;
$hours = floor($hourSeconds / $secondsInAnHour);
// Extract minutes
$minuteSeconds = $hourSeconds % $secondsInAnHour;
$minutes = floor($minuteSeconds / $secondsInAMinute);
// Extract the remaining seconds
$remainingSeconds = $minuteSeconds % $secondsInAMinute;
$seconds = ceil($remainingSeconds);
// Format and return
$timeParts = [];
$sections = [
'day' => (int)$days,
'hour' => (int)$hours,
'minute' => (int)$minutes,
'second' => (int)$seconds,
];
foreach ($sections as $name => $value){
if ($value > 0){
$timeParts[] = $value. ' '.$name.($value == 1 ? '' : 's');
}
}
return implode(', ', $timeParts);
}
</textarea>zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-46816923770911003612021-04-04T23:26:00.008+08:002021-04-05T08:01:50.493+08:00Generate QR code with CodeigniterDatabase add a new field "qr_exist" tynyint(1) in tbl_user_master. (1 mean already got QR code).
<br/><br/>
Then upload "phpqrcode" zip file to Controller folder and extract the zip file.<br/>
https://www.dropbox.com/s/1sn68ln2c5fahdk/phpqrcode.zip?dl=0 <br/>
Note : this "phpqrcode" folder must saved in the same directory as your code file.<br/><br/>
Then add this code at top of page :
<br/>
<textarea style="height: 30px; width: 670px;">
include 'phpqrcode/qrlib.php';
</textarea>
<br/><br/>
Then add this code to create QR code image :
<textarea style="height: 150px; width: 670px;">
$invitation_url = site_url("register/index/".$first_acc_code);
$path = $_SERVER['DOCUMENT_ROOT'];
$file = $path.'/uploads/qrimages/'.$first_acc_code.".png";
$ecc = 'L';
$pixel_Size = 10;
$frame_Size = 10;
QRcode::png($invitation_url, $file, $ecc, $pixel_Size, $frame_Size);
</textarea>
<br/><br/>
Then show QR code image by code below :
<textarea style="height: 30px; width: 670px;">
<center><img src="<?=base_url()?>uploads/qrimages/<?=$unique_code?>.png"></center>
</textarea>
<br/><br/>zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-31328345415537162272021-02-07T19:37:00.002+08:002021-02-07T19:37:35.007+08:00jquery check input empty before submituse .each instead of foreach loop.
<textarea style="height: 500px; width: 670px;">
<script>
$(".form-box").submit(function(){
var allhasvalue = false;
var namehasvalue = false;
var pricehasvalue = false;
$('[name="title[]"]').each(function(){
if ($.trim($(this).val()).length > 0){
namehasvalue = true;
}
});
$('[name="price[]"]').each(function(){
if ($.trim($(this).val()).length > 0){
pricehasvalue = true;
}
});
if (!namehasvalue) alert("Please fill Product Name");
if (!pricehasvalue) alert("Please fill Product Price");
if(namehasvalue == false || pricehasvalue == false)
{
allhasvalue = false;
}
return allhasvalue;
});
</script>
</textarea><br/><br/>
zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0tag:blogger.com,1999:blog-5619550813183664888.post-85732937509148329702021-02-03T03:50:00.006+08:002021-02-03T03:53:08.160+08:00body, html { overflow-x:hidden; } break smooth scrollingsimple solution : <br/>
Put overflow-x:hidden; on DIV instead of body and html.<br/><br/>
First copy paste the following code to your css file to find out which DIV causing the problem :<br/>
<textarea style="height: 50px; width: 670px;">
* { outline: 1px red solid !important; visibility: visible !important }
</textarea><br/><br/>
Then put overflow-x:hidden; on the DIV class, example :<br/>
<textarea style="height: 100px; width: 670px;">
.row{
overflow-x: hidden;
}
</textarea>zac1987http://www.blogger.com/profile/16794326033729613715noreply@blogger.com0