-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlink.php
46 lines (27 loc) · 826 Bytes
/
link.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
//including common files
require_once './include/common.php';
$t = $_GET['t'];
//Checking stock already exists in table
$query = "SELECT * FROM `stocklistbackup` where `isWatch` = 'no' order by cSymbol";
$result = mysqli_query($GLOBALS['mysqlConnect'],$query);
while($row = mysqli_fetch_assoc($result)) {
$td = $row['cSymbol'];
if (str_contains($td, '&')) {
$td = str_replace('&','_',$td);
$td = str_replace('-','_',$td);
}
if($t == 'profit') {
if($row['qbuy'] > 0) {
echo "https://in.tradingview.com/chart/bXKZrFip/?symbol=NSE%3A".$td;
echo "<br/>";
}
}
if($t == 'loss') {
if($row['qbuy'] < 0) {
echo "https://in.tradingview.com/chart/bXKZrFip/?symbol=NSE%3A".$td;
echo "<br/>";
}
}
}
?>