Adding basic README.md file

This commit is contained in:
Mo Elzubeir
2020-10-17 18:38:47 -05:00
parent 8eb24b3be5
commit ec47b6227a
2 changed files with 94 additions and 305 deletions
-305
View File
@@ -1,305 +0,0 @@
<?php
ob_start();
session_start();
include('includes/connect.php');
include('includes/conf.php');
$sql="SELECT * FROM publication_issue iss join publication pub ON iss.id_publication = pub.id_publication where 1 and iss.id_publication_issue = '420521' order by iss.id_publication";
$query = mysql_fetch_array(mysql_query($sql));
$cur_date = "";
$d = date('Y-m-d');
if ($query) {
//print_r($query);exit;
if($query['id_frequency'] == '1')
{
$d1 = strtotime(date('Y-m-d'));
$d2 = strtotime($query['email_freq1']);
if($d1 > $d2 || $query['email_freq1'] =="")
{
echo "1";
mysql_query("update publication_issue set email_freq1 = '$d' where id_publication_issue = '".$query['id_publication_issue']."'");
}
}
else
if($query['id_frequency'] == '2')
{
$timestamp = strtotime(date('Y-m-d'));
$day = date('l', $timestamp);
$d1 = strtotime(date('Y-m-d'));
$d2 = strtotime($query['email_freq2']);
if($d1 > $d2 || $query['email_freq2'] =="")
{
if($day == $query['expected_day'])
{
echo "2";
mysql_query("update publication_issue set email_freq2 = '$d' where id_publication_issue = '".$query['id_publication_issue']."'");
}
}
//echo $day;
}
else
if($query['id_frequency'] == '3')
{
$d1 = strtotime(date('Y-m-d'));
$d2 = strtotime($query['email_freq3']);
if($d1 > $d2 || $query['email_freq3'] =="")
{
$timestamp = strtotime(date('Y-m-d'));
$day = date('l', $timestamp);
$days = explode(',',$query['expected_day']);
if(in_array($day,$days))
{
echo "3";
mysql_query("update publication_issue set email_freq3 = '$d' where id_publication_issue = '".$query['id_publication_issue']."'");
}
}
}
else
if($query['id_frequency'] == '4')
{
$d1 = strtotime(date('Y-m-d'));
$d2 = strtotime($query['email_freq3']);
if($d1 > $d2 || $query['email_freq3'] =="")
{
$get_d = explode('-',$query['expected_day']);
$new_date = $get_d[2]."-".date('m-Y');
if($d == $new_date)
{
echo "4";
mysql_query("update publication_issue set email_freq4 = '$d' where id_publication_issue = '".$query['id_publication_issue']."'");
}
}
}
else
if($query['id_frequency'] == '5')
{
$d1 = strtotime(date('Y-m-d'));
$d2 = strtotime($query['email_freq5']);
if($query['email_freq5'] =="")
{
if($d == $query['expected_date'])
{
$d = date('Y-m-d', strtotime("+2 months", strtotime($query['expected_date'])));
echo "5";
mysql_query("update publication_issue set email_freq5 = '$d' where id_publication_issue = '".$query['id_publication_issue']."'");
}
}
else
{
if($d == $query['email_freq5'])
{
$d = date('Y-m-d', strtotime("+2 months", strtotime($query['email_freq5'])));
echo "5";
mysql_query("update publication_issue set email_freq5 = '$d' where id_publication_issue = '".$query['id_publication_issue']."'");
}
}
mysql_query("update publication set email_freq5 = '$d' where id_publication_issue = '".$query['id_publication_issue']."'");
}
else
if($query['id_frequency'] == '6')
{
// mysql_query("update publication set email_freq6 = '".$query['expected_day']."' where id_publication_issue = '".$query['id_publication_issue']."'");
$d1 = strtotime(date('Y-m-d'));
$d2 = strtotime($query['email_freq6']);
if($query['email_freq6'] =="")
{
if($d == $query['expected_date'])
{
$d = date('Y-m-d', strtotime("+3 months", strtotime($query['expected_date'])));
echo "6";
mysql_query("update publication_issue set email_freq6 = '$d' where id_publication_issue = '".$query['id_publication_issue']."'");
}
}
else
{
if($d == $query['email_freq6'])
{
$d = date('Y-m-d', strtotime("+3 months", strtotime($query['email_freq6'])));
echo "6";
mysql_query("update publication_issue set email_freq6 = '$d' where id_publication_issue = '".$query['id_publication_issue']."'");
}
}
}
else
if($query['id_frequency'] == '7')
{
$d1 = strtotime(date('Y-m-d'));
$d2 = strtotime($query['email_freq7']);
if($query['email_freq7'] =="")
{
if($d == $query['expected_date'])
{
$d = date('Y-m-d', strtotime("+2 year", strtotime($query['expected_date'])));
echo "7";
mysql_query("update publication_issue set email_freq7 = '$d' where id_publication_issue = '".$query['id_publication_issue']."'");
}
}
else
{
if($d == $query['email_freq7'])
{
$d = date('Y-m-d', strtotime("+2 year", strtotime($query['email_freq7'])));
echo "7";
mysql_query("update publication_issue set email_freq7 = '$d' where id_publication_issue = '".$query['id_publication_issue']."'");
}
}
}
else
if($query['id_frequency'] == '8')
{
$d1 = strtotime(date('Y-m-d'));
$d2 = strtotime($query['email_freq3']);
if($d1 > $d2 || $query['email_freq3'] =="")
{
$get_d = explode('-',$query['expected_day']);
$new_date = $get_d[2]."-".$get_d[1]."-".date('Y');
if($d == $new_date)
{
echo "8";
}
}
}
else
if($query['id_frequency'] == '9')
{
$timestamp = strtotime(date('Y-m-d'));
$day = date('l', $timestamp);
$d1 = strtotime(date('Y-m-d'));
$d2 = strtotime($query['email_freq2']);
$inc = '0';
$upd = $d."_".$inc;
if($d1 > $d2 || $query['email_freq9'] =="")
{
if($query['email_freq9'] == "")
{
$dd = $d."_".$inc;
$exp = explode($dd);
}
else
{
$exp = explode($query['email_freq9']);
}
if($day == $query['expected_day'] && ($exp[1] % 2) == 0)
{
$inc = $exp[1] + 1;
$upd = $d."_".$inc;
echo "9";
mysql_query("update publication_issue set email_freq9 = '$upd' where id_publication_issue = '".$query['id_publication_issue']."'");
}
}
}
/* require("phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->From = $_SITENAME; //From Address -- CHANGE --
$mail->FromName = $_SITENAME; //From Name -- CHANGE --
$mail->AddAddress($query['email'], "User"); //To Address -- CHANGE --
$mail->AddBcc("sourabhs@custom-soft.com", "User"); //To Address -- CHANGE --
$mail->IsHTML(false); // set email format to HTML
$mail->Subject = "Notification:Your expected date crossed";
$mail->Body = "Hello ".$query['name_publication_en'].",
<br /><br />
This is to inform you that you have exceeded your expected date i.e. ".date('Y-m-d',strtotime($query['expected_date'])).".";
*/
}
?>
+94
View File
@@ -0,0 +1,94 @@
<img src="./images/logo.png" alt="MOMS" align="right">
# Media Outlet Management System &middot; [![Build Status](https://img.shields.io/travis/npm/npm/latest.svg?style=flat-square)] [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/your/your-project/blob/master/LICENSE)
> Additional information or tag line
Keep track of print periodicals pulication dates and their arrival.
## Installing / Getting started
php/apache/mysql
```shell
commands here
```
Here you should say what actually happens when you execute the code above.
## Developing
### Built With
PHP
### Prerequisites
Apache2/MySQL
### Setting up Dev
Here's a brief intro about what a developer must do in order to start developing
the project further:
```shell
git clone https://github.com/your/your-project.git
cd your-project/
packagemanager install
```
And state what happens step-by-step. If there is any virtual environment, local server or database feeder needed, explain here.
### Building
If your project needs some additional steps for the developer to build the
project after some code changes, state them here. for example:
```shell
./configure
make
make install
```
Here again you should state what actually happens when the code above gets
executed.
### Deploying / Publishing
give instructions on how to build and release a new version
In case there's some step you have to take that publishes this project to a
server, this is the right time to state it.
```shell
packagemanager deploy your-project -s server.com -u username -p password
```
And again you'd need to tell what the previous code actually does.
## Configuration
Here you should write what are all of the configurations a user can enter when using the project.
## Tests
Describe and show how to run the tests with code examples.
Explain what these tests test and why.
```shell
Give an example
```
## Style guide
Explain your code style and show how to check it.
## Api Reference
If the api is external, link to api documentation. If not describe your api including authentication methods as well as explaining all the endpoints with their required parameters.
## Database
Explaining what database (and version) has been used. Provide download links.
Documents your database design and schemas, relations etc...
## Licensing
MIT License