Skip to content

Commit

Permalink
Merge pull request #5 from NymexData/development
Browse files Browse the repository at this point in the history
New version 2.0.1
  • Loading branch information
felipealfonsog authored Jun 6, 2023
2 parents 9fdce35 + 06da991 commit 7f3efe6
Show file tree
Hide file tree
Showing 39 changed files with 2,439 additions and 170 deletions.
Binary file modified .DS_Store
Binary file not shown.
69 changes: 69 additions & 0 deletions SQL-Latest-Updated/750W.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 06, 2023 at 09:12 AM
-- Server version: 8.0.33
-- PHP Version: 8.2.5

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `750W`
--

-- --------------------------------------------------------

--
-- Table structure for table `reg_750`
--

CREATE TABLE `reg_750` (
`id` int NOT NULL,
`data` longtext NOT NULL,
`work_name` mediumtext NOT NULL,
`date` varchar(255) NOT NULL,
`activo` int DEFAULT NULL,
`date_title` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `reg_750`
--

INSERT INTO `reg_750` (`id`, `data`, `work_name`, `date`, `activo`, `date_title`) VALUES
(31, 'Writing ... Testing ', '', 'Tuesday 6 of June 2023 09:12:17 AM', NULL, 'Tuesday June the 6th, 2023');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `reg_750`
--
ALTER TABLE `reg_750`
ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `reg_750`
--
ALTER TABLE `reg_750`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Binary file added db-files-1.0.0.3/.DS_Store
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
55 changes: 49 additions & 6 deletions db.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,59 @@

// $link1 = mysql_connect ("localhost", "root", "")
// mysqli_connect("localhost","root","")
$link1 = mysql_connect("localhost", "root", "")
or die ("No se puede conectar a MySQL ");
//




#$link1 = mysql_connect("localhost", "root", "fafarafa")
# or die ("No se puede conectar a MySQL ");

mysql_select_db ("750W") ;
#mysql_select_db ("750W") ;

//

$link2 = mysql_connect("localhost", "root", "")
or die ("No se puede conectar a MySQL ");
#$link2 = mysql_connect("localhost", "root", "fafarafa")
# or die ("No se puede conectar a MySQL ");

#mysql_select_db ("750W") ;


$cons_usuario="root";
$cons_contra="fafarafa";
$cons_base_datos="750W";
$cons_equipo="localhost";

$link1 =
mysqli_connect($cons_equipo,$cons_usuario,$cons_contra,$cons_base_datos);
/*
if(!$link1)
{
echo "<h3>No se ha podido conectar PHP - MySQL, verifique sus datos.</h3><hr><br>";
}
else
{
echo "<h3>Conexion Exitosa PHP - MySQL</h3><hr><br>";
}
*/
#
#
#


$link2 =
mysqli_connect($cons_equipo,$cons_usuario,$cons_contra,$cons_base_datos);

/*
if(!$link2)
{
echo "<h3>No se ha podido conectar PHP - MySQL, verifique sus datos.</h3><hr><br>";
}
else
{
echo "<h3>Conexion Exitosa PHP - MySQL</h3><hr><br>";
}
*/

mysql_select_db ("750W") ;

?>
28 changes: 15 additions & 13 deletions delpage.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@



<title>Word Counter & Toolkit Platform for writers</title>
<script src="jquery-1.7.2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="jquery.textarea-expander.js"></script>
Expand All @@ -9,13 +10,10 @@
<link rel="stylesheet" href="stylesheet.css" type="text/css" charset="utf-8" />
<link href='favicon.gif' rel='shortcut icon' />


<?php

<?php
include("db.php");



/// echo $_POST["id56"];

// echo $row[0] ;
Expand All @@ -25,24 +23,28 @@
// } else {
//date_default_timezone_set("America/Santiago");
//$fecha = localtime();

$id = $_POST["id56"];
echo $id;
$fecha = date('l j \of F Y h:i:s A');
$fecha_t = date('l F \t\h\e jS, Y');

//$sql2='UPDATE `reg_750` SET `data` ="'.$g.'", `date` ="'.$fecha.'", `date_title` = "'$fecha_t'" WHERE `reg_750`.`id` ="'.$f.'";';
// $sql2="DELETE INTO `reg_750` (`id`, `data`, `work_name`, `date`, `activo`, `date_title`) VALUES (NULL,'', '', '".$fecha."', '', '".$fecha_t."');";

$sql2="DELETE FROM reg_750 WHERE `id` = ".$id." order by id desc;";
echo "<br>";

$rs2 = mysql_query ($sql2,$link2) or die ("<br><b>Error!. ".$sql2."</b>");
$sql2 = "DELETE FROM `reg_750` WHERE `id` = " . $id;

// echo " <a href=\"javascript:history.go(-1);\">back</a> ";
header("Location: ./index.php"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
$rs2 = $link2->query($sql2);
if (!$rs2) {
die("<br><b>Error!. " . $link2->error . "</b>");
}

// }

// echo " <a href=\"javascript:history.go(-1);\">back</a> ";
header("Location: ./index.php"); /* Redirect browser */
exit;
?>


?>
Loading

0 comments on commit 7f3efe6

Please sign in to comment.