-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathSplit1.php
More file actions
76 lines (48 loc) · 1.4 KB
/
Copy pathSplit1.php
File metadata and controls
76 lines (48 loc) · 1.4 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
//error_reporting(0);
include ("puzzlemaker.php");
?>
<?php
include_once 'db_credentials.php';
$sql = "SELECT * FROM quote_table
WHERE id = '-1'";
$db->set_charset("utf8");
$touched=isset($_POST['ident']);
if (!$touched) {
echo 'You need to select an entry. Go back and try again. <br>';
?>
<button><a class="btn btn-sm" href="slider.php">Go back</a></button>
<?php
} else { $id = $_POST['ident'];
$sql = "SELECT * FROM quote_table
WHERE id = '$id'";
}
if (!$result = $db->query($sql)) {
die ('There was an error running query[' . $connection->error . ']');
} $nochars=3;
echo '<h2 id="title">Split Quote view as Slider</h2><br>';
$punctuation=TRUE;
$sqx = "SELECT * FROM preferences WHERE name = 'KEEP_PUNCTUATION_MARKS'";
$resultPunct = mysqli_query($db,$sqx);
while ($rowPunct =mysqli_fetch_array($resultPunct))
{
$punctuation=$rowPunct["value"];
}
$nochars=3;
$sqx = "SELECT * FROM preferences WHERE name = 'DEFAULT_CHUNK_SIZE'";
$result2 = mysqli_query($db,$sqx);
while ($row2 =mysqli_fetch_array($result2))
{
$nochars=$row2["value"];
}
$result2 = mysqli_query($db,$sqx);
while ($row2 =mysqli_fetch_array($result2))
{
$nochars=$row2["Chunks"];
}
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()){
$quoteline = $row["quote"];
} }
SplitMaker($quoteline,$nochars);
?>