소스 검색

editing title ranks is broken still

pull/16/head
mauirixxx 7 년 전
부모
커밋
1cfc60dad9
3개의 변경된 파일44개의 추가작업 그리고 2개의 파일을 삭제
  1. +1
    -0
      includes/titleranks-add.php
  2. +42
    -1
      includes/titleranks-editor.php
  3. +1
    -1
      titlemanager.php

+ 1
- 0
includes/titleranks-add.php 파일 보기

@@ -63,6 +63,7 @@ while ($row = $result->fetch_assoc()) {
echo '<tr><td>' . $stnid . '<td>' . $tnid . '</td><td>' . $stname . '</td><td>' . number_format($stpoints) . '</td><td>' . $strank . '</td><td><input type="checkbox" name="editstitle[]" value="' . $stnid . '"></td></tr>';
}
$stmtview->close();
$_SESSION['tid'] = $_POST['tid'];
echo '</table><br /><input type="hidden" name="title" value="modsubtitle"><input type="submit" value="Edit selected titles"></form><br />If anything looks off, please fix it!<br /><br />';
echo 'Return to <a href="titlemanager.php" class="navlink">title manager</a>';
?>

+ 42
- 1
includes/titleranks-editor.php 파일 보기

@@ -1,4 +1,45 @@
<?php
echo 'code to mod title ranks via an include goes here<br /><br />';

# delete this block when shit finally works.
ini_set('display_errors', 'on');
error_reporting(E_ALL);
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
# delete the above when shit finally works

$tid = $_SESSION['tid'];
echo 'the session tid number is: <b>' . $_SESSION['tid'] . '</b><br />';

$stid = array();
foreach ($_POST['editstitle'] as $tredit) {
$stid[] = (int)$tredit;
}
$stid = implode(',', $stid);
echo 'the value of stid is now: ' . $stid . '<br />';
$sredit = $con->prepare("SELECT * FROM gwsubtitles WHERE titlenameid = ? AND stnameid IN (?)");
$sredit->bind_param("is", $tid, $stid);
$sredit->execute();
$sredit->store_result();
$sredit->bind_result($gwtid, $gwstid);
while ($sredit->fetch()) {
echo 'farts <br />';
}
$sredit->free_result();
$sredit->close();

// keep this section
/* if (isset($_POST['editstitle'])) {
$sredit = $con->prepare("SELECT * FROM gwsubtitles WHERE stnameid = ? AND titlenameid = ?");
foreach ($_POST['editstitle'] as $tredit) {
$sredit->bind_param("ii", $tid, $tredit);
$sredit->execute();
$sredit->store_result();
$sredit->bindresult(
echo 'the value is: <b>' . $tredit . '</b><br />';
}
} else {
echo 'nothing is set?? <br />';
}
*/
echo '<br />code to mod title ranks via an include goes here<br /><br />';
echo 'Return to <a href="titlemanager.php" class="navlink">title manager</a>';
?>

+ 1
- 1
titlemanager.php 파일 보기

@@ -41,7 +41,7 @@ if ($_SESSION['admin'] == 1) {
echo 'Modify titles <form action="titlemanager.php" method="post"><input type="hidden" name="title" value="modtitle"><select name="tid" onchange="this.form.submit()"><option selected disabled>Select title</option>';
include ('includes/title-select.php');
echo '</select><noscript><input type="submit" value="Modify Title"></noscript></form><br /><br />';
echo 'Add title ranks and points to <form action="titlemanager" method="post"><input type="hidden" name="title" value="addsubtitle"><select name="tid" onchange="this.form.submit()"><option selected disabled>Add title rank(s)</option>';
echo 'Add title ranks and points to <form action="titlemanager.php" method="post"><input type="hidden" name="title" value="addsubtitle"><select name="tid" onchange="this.form.submit()"><option selected disabled>Add title rank(s)</option>';
include ('includes/title-select.php');
echo '</select><noscript><input type="submit" value="Add title rank"></noscript></form><br /><br />';
// now to view the last 5 title entries in the database


불러오는 중...
취소
저장