Switch to mysqli_* in other php files.
darkmorford -
dc98d7eb2bb1
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -8,12 +8,12 auth_redirect(); // Require logged in user to access this page.
8 if('post_twitter' == $_REQUEST['action'])
8 if('post_twitter' == $_REQUEST['action'])
9 {
9 {
10 check_nonce('new-character-twitter');
10 check_nonce('new-character-twitter');
11
11
12 #Fetch the password from the DB.
12 #Fetch the password from the DB.
13 $acct = $mtdb->getRow(sprintf("SELECT username, password FROM twitter_user WHERE id = '%d'", $_REQUEST['twitter-account']));
13 $acct = $mtdb->getRow(sprintf("SELECT username, password FROM twitter_user WHERE id = '%d'", $_REQUEST['twitter-account']));
14
14
15 $post_at = strtotime($_REQUEST['date18']);
15 $post_at = strtotime($_REQUEST['date18']);
16
16
17 if($post_at)
17 if($post_at)
18 {
18 {
19 if($post_at <= strtotime('now'))
19 if($post_at <= strtotime('now'))
@@ -21,7 +21,7 if('post_twitter' == $_REQUEST['action'])
21 #If we can post immediately, do so. Bypass the scheduler whenever possible.
21 #If we can post immediately, do so. Bypass the scheduler whenever possible.
22 #Treat a date/time in the past as immediate.
22 #Treat a date/time in the past as immediate.
23 $ret = twitterpost($_REQUEST['message'], $acct->username, $acct->password);
23 $ret = twitterpost($_REQUEST['message'], $acct->username, $acct->password);
24
24
25 if($ret)
25 if($ret)
26 {
26 {
27 $info.='Update posted to Twitter. <a href="http://www.twitter.com/'.$acct->username.'">View Twitter</a>.';
27 $info.='Update posted to Twitter. <a href="http://www.twitter.com/'.$acct->username.'">View Twitter</a>.';
@@ -37,9 +37,9 if('post_twitter' == $_REQUEST['action'])
37 #No luck, gotta schedule.
37 #No luck, gotta schedule.
38 $mtdb->query(
38 $mtdb->query(
39 sprintf("INSERT INTO twitter_post (status, user, time, text)VALUES ('scheduled', '%d', FROM_UNIXTIME('%d'), '%s')",
39 sprintf("INSERT INTO twitter_post (status, user, time, text)VALUES ('scheduled', '%d', FROM_UNIXTIME('%d'), '%s')",
40 mysql_real_escape_string($_REQUEST['twitter-account']),
40 mysqli_real_escape_string($mtdb->link, $_REQUEST['twitter-account']),
41 $post_at,
41 $post_at,
42 mysql_real_escape_string($_REQUEST['message'])
42 mysqli_real_escape_string($mtdb->link, $_REQUEST['message'])
43 )
43 )
44 );
44 );
45 $info .= "Your tweet for user " . htmlentities($acct->username) . " has been scheduled.";
45 $info .= "Your tweet for user " . htmlentities($acct->username) . " has been scheduled.";
@@ -119,4 +119,4 At: <script type="text/javascript" src="CalendarPopup.js" ></script>
119
119
120 <?php
120 <?php
121 adminfooter();
121 adminfooter();
122 ?> No newline at end of file
122 ?>
@@ -9,11 +9,11 check_nonce('delete-strip-'.(int)$_REQUEST['strip_id']);
9
9
10 if(!deletestrip( $_REQUEST['strip_id'] ))
10 if(!deletestrip( $_REQUEST['strip_id'] ))
11 {
11 {
12 adminlog("Error deleting strip $_REQUEST[strip_id]:".mysql_error(), MTS_STRIP, MTA_DELETE, E_ERROR);
12 adminlog("Error deleting strip $_REQUEST[strip_id]:".mysqli_error(), MTS_STRIP, MTA_DELETE, E_ERROR);
13 mtdie('Error deleting the specified strip.','SQL Error');
13 mtdie('Error deleting the specified strip.','SQL Error');
14 }
14 }
15
15
16 adminlog("Strip $_REQUEST[strip_id] deleted.", MTS_STRIP, MTA_DELETE);
16 adminlog("Strip $_REQUEST[strip_id] deleted.", MTS_STRIP, MTA_DELETE);
17 _redirect( ADMIN_PATH . '/manage-comics.php?deleted=success' );
17 _redirect( ADMIN_PATH . '/manage-comics.php?deleted=success' );
18
18
19 ?> No newline at end of file
19 ?>
@@ -9,7 +9,7 check_nonce('delete-page-'.$_REQUEST['page_name']);
9
9
10 if(!deletepage( $_REQUEST['page_name'] ))
10 if(!deletepage( $_REQUEST['page_name'] ))
11 {
11 {
12 adminlog("Error deleting page $_REQUEST[page_name]: ".mysql_error(), MTS_PAGE, MTA_DELETE, E_ERROR);
12 adminlog("Error deleting page $_REQUEST[page_name]: ".mysqli_error(), MTS_PAGE, MTA_DELETE, E_ERROR);
13 mtdie('Error deleting the specified page.','SQL Error');
13 mtdie('Error deleting the specified page.','SQL Error');
14 }
14 }
15
15
@@ -9,9 +9,9 check_nonce('delete-rant-'.(int)$_REQUEST['rant_id']);
9
9
10 if(!deleterant( $_REQUEST['rant_id'] ))
10 if(!deleterant( $_REQUEST['rant_id'] ))
11 {
11 {
12 adminlog("Error deleting rant $_REQUEST[rant_id]: ".mysql_error(), MTS_RANT, MTA_DELETE, E_ERROR);
12 adminlog("Error deleting rant $_REQUEST[rant_id]: ".mysqli_error(), MTS_RANT, MTA_DELETE, E_ERROR);
13 mtdie('Error deleting the specified rant.','SQL Error');
13 mtdie('Error deleting the specified rant.','SQL Error');
14 }
14 }
15
15
16 _redirect( ADMIN_PATH . '/manage-rants.php?deleted=success' );
16 _redirect( ADMIN_PATH . '/manage-rants.php?deleted=success' );
17 ?> No newline at end of file
17 ?>
@@ -9,7 +9,7 $strip->id = (int)$_REQUEST['strip_id'];
9 $strip = getstrip($strip->id);
9 $strip = getstrip($strip->id);
10
10
11 if( $_POST ) {
11 if( $_POST ) {
12
12
13 // Form Elements
13 // Form Elements
14 $strip->new_id = (int)$_POST['strip_new_id'] ? (int)$_POST['strip_new_id'] : $strip->id;
14 $strip->new_id = (int)$_POST['strip_new_id'] ? (int)$_POST['strip_new_id'] : $strip->id;
15 $strip->published = empty($_POST['strip_date']) ? time() : strtotime( $_POST['strip_date'] );
15 $strip->published = empty($_POST['strip_date']) ? time() : strtotime( $_POST['strip_date'] );
@@ -18,7 +18,7 if( $_POST ) {
18 $strip->transcript_posted = $_POST['content'];
18 $strip->transcript_posted = $_POST['content'];
19 $strip->book = trim($_POST['book']);
19 $strip->book = trim($_POST['book']);
20 $strip->page = trim($_POST['page']);
20 $strip->page = trim($_POST['page']);
21
21
22 if( '' == $strip->title ) mtdie('Strips must be supplied with titles.');
22 if( '' == $strip->title ) mtdie('Strips must be supplied with titles.');
23
23
24 $YESTERDAY = mktime(0,0,0, date('m'), date('d')-1, date('Y'));
24 $YESTERDAY = mktime(0,0,0, date('m'), date('d')-1, date('Y'));
@@ -37,26 +37,26 if( $_POST ) {
37 adminlog("Image upload failed.", MTS_STRIP, MTA_ADD, E_WARNING);
37 adminlog("Image upload failed.", MTS_STRIP, MTA_ADD, E_WARNING);
38 mtdie('If you want to upload a new comic, you must provide said comic.','Strip upload failed.');
38 mtdie('If you want to upload a new comic, you must provide said comic.','Strip upload failed.');
39 }
39 }
40
40
41 // get image type and target extension
41 // get image type and target extension
42 $imagedata = getimagesize($_FILES['comicFile']['tmp_name']);
42 $imagedata = getimagesize($_FILES['comicFile']['tmp_name']);
43 $strip->media = $imagedata[2];
43 $strip->media = $imagedata[2];
44 $fileext = $mtdb->getOne( 'SELECT extension FROM media_t WHERE id = ' . (int)$strip->media );
44 $fileext = $mtdb->getOne( 'SELECT extension FROM media_t WHERE id = ' . (int)$strip->media );
45
45
46 if(strlen($fileext) < 3)
46 if(strlen($fileext) < 3)
47 {
47 {
48 //bad image upload type
48 //bad image upload type
49 adminlog("Bad image type upload on new strip. Invalid media type.", MTS_STRIP, MTA_ADD, E_ERROR);
49 adminlog("Bad image type upload on new strip. Invalid media type.", MTS_STRIP, MTA_ADD, E_ERROR);
50 mtdie('Bad image type upload on new strip. Invalid media type.');
50 mtdie('Bad image type upload on new strip. Invalid media type.');
51 }
51 }
52
52
53 // Insert new strip into the database, get a real $strip->id
53 // Insert new strip into the database, get a real $strip->id
54 if(!insertstrip( $strip ))
54 if(!insertstrip( $strip ))
55 {
55 {
56 adminlog("Error on insertion of new strip: ".mysql_error(), MTS_STRIP, MTA_ADD, E_ERROR);
56 adminlog("Error on insertion of new strip: ".mysqli_error(), MTS_STRIP, MTA_ADD, E_ERROR);
57 mtdie('Error on insertion of new strip: '.mysql_error(), 'SQL Error');
57 mtdie('Error on insertion of new strip: '.mysqli_error(), 'SQL Error');
58 }
58 }
59
59
60 // Store the uploaded file to xxxx-0.ext
60 // Store the uploaded file to xxxx-0.ext
61 $basefile = $strip->published <= time() ?
61 $basefile = $strip->published <= time() ?
62 sprintf(SITE_PATH_ABS.'/'.SITE_STRIP.'/'.'%04d.%s', $strip->id, $fileext) :
62 sprintf(SITE_PATH_ABS.'/'.SITE_STRIP.'/'.'%04d.%s', $strip->id, $fileext) :
@@ -73,11 +73,11 if( $_POST ) {
73
73
74 $info.="<p>Comic posted!</p>";
74 $info.="<p>Comic posted!</p>";
75 break;
75 break;
76
76
77 case 'edit_comic':
77 case 'edit_comic':
78 if( 0 >= $strip->new_id ) mtdie('Strip numbers must be numeric, greater than 0.');
78 if( 0 >= $strip->new_id ) mtdie('Strip numbers must be numeric, greater than 0.');
79 if( 0 >= $strip->id ) mtdie('Existing strip number, in the form, was zero. This should never happen.');
79 if( 0 >= $strip->id ) mtdie('Existing strip number, in the form, was zero. This should never happen.');
80
80
81 // When updating, $strip->id is the old strip number. Update in place first. Possibly adjust strip number later.
81 // When updating, $strip->id is the old strip number. Update in place first. Possibly adjust strip number later.
82 check_nonce('save-strip-'.$strip->id);
82 check_nonce('save-strip-'.$strip->id);
83
83
@@ -87,26 +87,26 if( $_POST ) {
87 $strip->media = $imagedata[2];
87 $strip->media = $imagedata[2];
88 }
88 }
89 $fileext = $mtdb->getOne( 'SELECT extension FROM media_t WHERE id=' . (int)$strip->media );
89 $fileext = $mtdb->getOne( 'SELECT extension FROM media_t WHERE id=' . (int)$strip->media );
90
90
91 if(strlen($fileext) < 3)
91 if(strlen($fileext) < 3)
92 {
92 {
93 //bad image upload type
93 //bad image upload type
94 adminlog("Bad image type upload on strip ".$strip->id.". Invalid media type.", MTS_STRIP, MTA_UPDATE, E_ERROR);
94 adminlog("Bad image type upload on strip ".$strip->id.". Invalid media type.", MTS_STRIP, MTA_UPDATE, E_ERROR);
95 mtdie('Bad image type upload on strip '.$strip->id.'. Invalid media type.');
95 mtdie('Bad image type upload on strip '.$strip->id.'. Invalid media type.');
96 }
96 }
97
97
98 // Update existing strip
98 // Update existing strip
99 if(!updatestrip( $strip ) )
99 if(!updatestrip( $strip ) )
100 {
100 {
101 adminlog("Failed to update strip ".$strip->id.".", MTS_STRIP, MTA_UPDATE);
101 adminlog("Failed to update strip ".$strip->id.".", MTS_STRIP, MTA_UPDATE);
102 mtdie('Error updating strip: ' . mysql_error(), 'SQL Error');
102 mtdie('Error updating strip: ' . mysqli_error(), 'SQL Error');
103 }
103 }
104
104
105 if( is_valid_upload('comicFile') ) { // If uploading, store the uploaded file to xxxx-n.ext
105 if( is_valid_upload('comicFile') ) { // If uploading, store the uploaded file to xxxx-n.ext
106 $basefile = $strip->published <= time() ?
106 $basefile = $strip->published <= time() ?
107 sprintf(SITE_PATH_ABS.'/'.SITE_STRIP.'/'.'%04d.%s', $strip->id, $fileext) :
107 sprintf(SITE_PATH_ABS.'/'.SITE_STRIP.'/'.'%04d.%s', $strip->id, $fileext) :
108 sprintf(SITE_PATH_ABS.'/'.SITE_STRIP.'/restricted/'.'%04d.%s', $strip->id, $fileext);
108 sprintf(SITE_PATH_ABS.'/'.SITE_STRIP.'/restricted/'.'%04d.%s', $strip->id, $fileext);
109
109
110 if(!move_uploaded_file($_FILES['comicFile']['tmp_name'], $basefile))
110 if(!move_uploaded_file($_FILES['comicFile']['tmp_name'], $basefile))
111 {
111 {
112 adminlog("Filesystem error in saving image.", MTS_STRIP, MTA_UPDATE, E_ERROR);
112 adminlog("Filesystem error in saving image.", MTS_STRIP, MTA_UPDATE, E_ERROR);
@@ -120,7 +120,7 if( $_POST ) {
120 if( $_POST['broadcast'] ) {
120 if( $_POST['broadcast'] ) {
121 #Limit broadcast message to 60 characters. Compose it now.
121 #Limit broadcast message to 60 characters. Compose it now.
122 $b_msg = 'Comic ' . $strip->id . ' updated: ' . substr(trim($_REQUEST['broadcast_message']), 0, 60) . ', ' . SITE_HOST . SITE_PATH . "/strip/" . $strip->id;
122 $b_msg = 'Comic ' . $strip->id . ' updated: ' . substr(trim($_REQUEST['broadcast_message']), 0, 60) . ', ' . SITE_HOST . SITE_PATH . "/strip/" . $strip->id;
123
123
124 rsspost($b_msg, SITE_HOST.SITE_PATH.'/strip/'.$strip->id);
124 rsspost($b_msg, SITE_HOST.SITE_PATH.'/strip/'.$strip->id);
125 twitterpost($b_msg);
125 twitterpost($b_msg);
126 $info.="<p>Update broadcasted with message '$b_msg'.</p>";
126 $info.="<p>Update broadcasted with message '$b_msg'.</p>";
@@ -128,19 +128,19 if( $_POST ) {
128
128
129 $info.="<p>Changes saved. <a href=\"".SITE_HOST.SITE_PATH."/index.php?strip_id=".$strip->id."\">View on site</a>.";
129 $info.="<p>Changes saved. <a href=\"".SITE_HOST.SITE_PATH."/index.php?strip_id=".$strip->id."\">View on site</a>.";
130 break;
130 break;
131
131
132 default:
132 default:
133 adminlog("User did something strange.", MTS_STRIP, MTA_MODIFY);
133 adminlog("User did something strange.", MTS_STRIP, MTA_MODIFY);
134 mtdie('You know, it would be <em>really</em> nice if you avoided nonsensical actions.');
134 mtdie('You know, it would be <em>really</em> nice if you avoided nonsensical actions.');
135 }
135 }
136
136
137 $info = savetranscript($strip) . $info;
137 $info = savetranscript($strip) . $info;
138
138
139 # If the strip number changed, swap strips sequentially to shuffle it into place
139 # If the strip number changed, swap strips sequentially to shuffle it into place
140 if( $strip->id != $strip->new_id ) {
140 if( $strip->id != $strip->new_id ) {
141 $f = fopen(SITE_PATH_ABS.'/'.SITE_STRIP.'/'.SITE_STRIP_LOCK, 'w');
141 $f = fopen(SITE_PATH_ABS.'/'.SITE_STRIP.'/'.SITE_STRIP_LOCK, 'w');
142 flock($f, LOCK_EX);
142 flock($f, LOCK_EX);
143
143
144 while( $strip->new_id < $strip->id ) { // Move this strip backward
144 while( $strip->new_id < $strip->id ) { // Move this strip backward
145 swap_strips( $strip->id - 1, $strip->id );
145 swap_strips( $strip->id - 1, $strip->id );
146 $strip->id--;
146 $strip->id--;
@@ -255,4 +255,3 if( file_exists( SITE_PATH_ABS.'/'.$file ) ){
255 <?php
255 <?php
256 adminfooter();
256 adminfooter();
257 ?>
257 ?>
258
@@ -26,10 +26,10 if( $_POST ) {
26 }
26 }
27
27
28 $action = isset($_POST['publish']) ? 'post' : 'edit';
28 $action = isset($_POST['publish']) ? 'post' : 'edit';
29
29
30 if( isset( $_POST['publish'] ) ) $rant->status = 'published'; // If [publish] button is used, ignore radio button
30 if( isset( $_POST['publish'] ) ) $rant->status = 'published'; // If [publish] button is used, ignore radio button
31
31
32
32
33 $source_rantimage_filename = $_FILES['ranterImage']['tmp_name'];
33 $source_rantimage_filename = $_FILES['ranterImage']['tmp_name'];
34 extract( pre_upload_rant_image( $source_rantimage_filename ) );
34 extract( pre_upload_rant_image( $source_rantimage_filename ) );
35 if( $upload_error ) $error.=$upload_error;
35 if( $upload_error ) $error.=$upload_error;
@@ -43,12 +43,12 if( $_POST ) {
43 $source_rantattachment_filename[] = $_FILES['rant_attachment']['tmp_name'][$i];
43 $source_rantattachment_filename[] = $_FILES['rant_attachment']['tmp_name'][$i];
44 }
44 }
45 }
45 }
46
46
47 switch( $_POST['action'] ) {
47 switch( $_POST['action'] ) {
48 case 'new_rant':
48 case 'new_rant':
49
49
50 check_nonce('new-rant');
50 check_nonce('new-rant');
51
51
52 if( ! $doing_upload ) {
52 if( ! $doing_upload ) {
53 // Use default rant image for this contributor.
53 // Use default rant image for this contributor.
54 $contributor = get_userdatabyid( $rant->author );
54 $contributor = get_userdatabyid( $rant->author );
@@ -58,11 +58,11 if( $_POST ) {
58 } else {
58 } else {
59 $rant->imagetype = $upload_imagetype;
59 $rant->imagetype = $upload_imagetype;
60 }
60 }
61
61
62 $rant->id = insertrant($rant);
62 $rant->id = insertrant($rant);
63 if( $rant->id === false )
63 if( $rant->id === false )
64 {
64 {
65 adminlog("Error on rant insertion: ".mysql_error(), MTS_RANT, MTA_INSERT, E_ERROR);
65 adminlog("Error on rant insertion: ".mysqli_error(), MTS_RANT, MTA_INSERT, E_ERROR);
66 mtdie('There was an error inserting the rant into the database.', 'SQL Error');
66 mtdie('There was an error inserting the rant into the database.', 'SQL Error');
67 }
67 }
68
68
@@ -72,7 +72,7 if( $_POST ) {
72 $upload_error = $upload_info = '';
72 $upload_error = $upload_info = '';
73 extract( save_upload_rant_attachment($_FILES['rant_attachment']['tmp_name'][$i], $rant->id) );
73 extract( save_upload_rant_attachment($_FILES['rant_attachment']['tmp_name'][$i], $rant->id) );
74
74
75 if( $upload_error ) $error.=$upload_error;
75 if( $upload_error ) $error.=$upload_error;
76 if( $upload_info ) {
76 if( $upload_info ) {
77 $info .= $upload_info;
77 $info .= $upload_info;
78 $rant->body = preg_replace('/(href|src)=\"([^\"]*?)\\{'.($i+1).'\\}(.*?)\"/', '\1="'.get_rantattachment_filename($rant_attachment_id).'"', $rant->body);
78 $rant->body = preg_replace('/(href|src)=\"([^\"]*?)\\{'.($i+1).'\\}(.*?)\"/', '\1="'.get_rantattachment_filename($rant_attachment_id).'"', $rant->body);
@@ -85,19 +85,19 if( $_POST ) {
85 if( $doing_upload ) {
85 if( $doing_upload ) {
86 extract( save_upload_rant_image( $source_rantimage_filename, $rant ) );
86 extract( save_upload_rant_image( $source_rantimage_filename, $rant ) );
87 if( $upload_info ) $info.=$upload_info;
87 if( $upload_info ) $info.=$upload_info;
88 if( $upload_error ) $error.=$upload_error;
88 if( $upload_error ) $error.=$upload_error;
89 } elseif($rant->imagetype != 'NULL') {
89 } elseif($rant->imagetype != 'NULL') {
90 extract( save_stock_rant_image( $source_rantimage_filename, $rant ) );
90 extract( save_stock_rant_image( $source_rantimage_filename, $rant ) );
91 if( $upload_info ) $info.=$upload_info;
91 if( $upload_info ) $info.=$upload_info;
92 if( $upload_error ) $error.=$upload_error;
92 if( $upload_error ) $error.=$upload_error;
93 }
93 }
94
94
95 break;
95 break;
96
96
97 case 'saverant':
97 case 'saverant':
98
98
99 check_nonce('save-rant-' . $rant->id);
99 check_nonce('save-rant-' . $rant->id);
100
100
101 if( isset( $_POST['rant_reverttodefaultimage'] ) ) {
101 if( isset( $_POST['rant_reverttodefaultimage'] ) ) {
102 // Use default rant image for this contributor, copy it into place
102 // Use default rant image for this contributor, copy it into place
103 $contributor = get_userdatabyid( $rant->author );
103 $contributor = get_userdatabyid( $rant->author );
@@ -106,13 +106,13 if( $_POST ) {
106 if($rant->imagetype != 'NULL')
106 if($rant->imagetype != 'NULL')
107 extract( save_stock_rant_image( $contributor->default_image, $rant ) );
107 extract( save_stock_rant_image( $contributor->default_image, $rant ) );
108 adminlog("Reverting to user's default rant image for rant ".$rant->id.".", MTS_RANT, MTA_UPDATE);
108 adminlog("Reverting to user's default rant image for rant ".$rant->id.".", MTS_RANT, MTA_UPDATE);
109
109
110 } elseif( $doing_upload ) {
110 } elseif( $doing_upload ) {
111 $rant->imagetype = $upload_imagetype;
111 $rant->imagetype = $upload_imagetype;
112 extract( save_upload_rant_image( $source_rantimage_filename, $rant ) );
112 extract( save_upload_rant_image( $source_rantimage_filename, $rant ) );
113 adminlog("Uploading new rant image for rant ".$rant->id.".", MTS_RANT, MTA_UPDATE);
113 adminlog("Uploading new rant image for rant ".$rant->id.".", MTS_RANT, MTA_UPDATE);
114 if( $upload_info ) $info.=$upload_info;
114 if( $upload_info ) $info.=$upload_info;
115 if( $upload_error ) $error.=$upload_error;
115 if( $upload_error ) $error.=$upload_error;
116 }
116 }
117
117
118 foreach($_POST['delete_attachment'] as $attachment)
118 foreach($_POST['delete_attachment'] as $attachment)
@@ -122,14 +122,14 if( $_POST ) {
122 for($i = 0; $i < count($existing_attachments); $i++) {
122 for($i = 0; $i < count($existing_attachments); $i++) {
123 $rant->body = preg_replace('/(href|src)=\"([^\"]*?)\\{'.($i+1).'\\}(.*?)\"/', '\1="'.get_rantattachment_filename($existing_attachments[$i]->id).'"', $rant->body);
123 $rant->body = preg_replace('/(href|src)=\"([^\"]*?)\\{'.($i+1).'\\}(.*?)\"/', '\1="'.get_rantattachment_filename($existing_attachments[$i]->id).'"', $rant->body);
124 }
124 }
125
125
126 for($j = $i; $j < count($source_rantattachment_filename) + $i; $j++) {
126 for($j = $i; $j < count($source_rantattachment_filename) + $i; $j++) {
127 if('' == $source_rantattachment_filename[$j - $i]) continue;
127 if('' == $source_rantattachment_filename[$j - $i]) continue;
128
128
129 $upload_error = $upload_info = '';
129 $upload_error = $upload_info = '';
130 extract( save_upload_rant_attachment($_FILES['rant_attachment']['tmp_name'][$j - $i], $rant->id) );
130 extract( save_upload_rant_attachment($_FILES['rant_attachment']['tmp_name'][$j - $i], $rant->id) );
131
131
132 if( $upload_error ) $error.=$upload_error;
132 if( $upload_error ) $error.=$upload_error;
133 if( $upload_info ) {
133 if( $upload_info ) {
134 $info .= $upload_info;
134 $info .= $upload_info;
135 $rant->body = preg_replace('/(href|src)=\"([^\"]*?)\\{'.($i+1).'\\}(.*?)\"/', '\1="'.get_rantattachment_filename($rant_attachment_id).'"', $rant->body);
135 $rant->body = preg_replace('/(href|src)=\"([^\"]*?)\\{'.($i+1).'\\}(.*?)\"/', '\1="'.get_rantattachment_filename($rant_attachment_id).'"', $rant->body);
@@ -137,7 +137,7 if( $_POST ) {
137 }
137 }
138
138
139 updaterant($rant);
139 updaterant($rant);
140
140
141 if($rant->status != 'draft' && $_POST['broadcast'] &&
141 if($rant->status != 'draft' && $_POST['broadcast'] &&
142 ($rant->published <= mktime(0,0,0, date('m'), date('d')-1, date('Y'))))
142 ($rant->published <= mktime(0,0,0, date('m'), date('d')-1, date('Y'))))
143 {
143 {
@@ -216,7 +216,7 tinyMCE.init({
216 </fieldset>
216 </fieldset>
217
217
218 <fieldset id="authordiv" class="dbx-box">
218 <fieldset id="authordiv" class="dbx-box">
219 <h3 class="dbx-handle">Author</h3>
219 <h3 class="dbx-handle">Author</h3>
220 <div class="dbx-content"><select name="rant_author"><?php
220 <div class="dbx-content"><select name="rant_author"><?php
221 $contrib = $mtdb->getAll('select id,name from contributor');
221 $contrib = $mtdb->getAll('select id,name from contributor');
222 foreach( $contrib as $k=>$v ) {
222 foreach( $contrib as $k=>$v ) {
@@ -305,12 +305,12 tinyMCE.init({
305 echo 'Custom rant image is specified.';
305 echo 'Custom rant image is specified.';
306 }
306 }
307 ?>
307 ?>
308
308
309 <p>Upload new rant image:<br/>
309 <p>Upload new rant image:<br/>
310 <input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
310 <input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
311 <input name="ranterImage" type="file"/>
311 <input name="ranterImage" type="file"/>
312 </p>
312 </p>
313 <p><input type="checkbox" name="rant_reverttodefaultimage" /> Revert to default rant image.</p>
313 <p><input type="checkbox" name="rant_reverttodefaultimage" /> Revert to default rant image.</p>
314 </td><td>
314 </td><td>
315 <?php if ( false !== $rantimage_filename ): ?>
315 <?php if ( false !== $rantimage_filename ): ?>
316 <p><img src="<?php echo SITE_HOST . '/' . SITE_PATH . '/' . $rantimage_filename; ?>" width="150" /></p>
316 <p><img src="<?php echo SITE_HOST . '/' . SITE_PATH . '/' . $rantimage_filename; ?>" width="150" /></p>
@@ -24,14 +24,14
24
24
25 for ($count = 0; $count < 5; $count++) {
25 for ($count = 0; $count < 5; $count++) {
26 $entry = $feed->getEntryByOffset($count);
26 $entry = $feed->getEntryByOffset($count);
27 $link = mysql_real_escape_string($entry->link);
27 $link = mysqli_real_escape_string($mtdb->link, $entry->link);
28 $title = mysql_real_escape_string($entry->title);
28 $title = mysqli_real_escape_string($mtdb->link, $entry->title);
29 $date = $entry->pubdate;
29 $date = $entry->pubdate;
30
30
31 $mtdb->query("INSERT INTO fredart (pubdate, title, link)
31 $mtdb->query("INSERT INTO fredart (pubdate, title, link)
32 VALUES (FROM_UNIXTIME($date), '$title', '$link')", false);
32 VALUES (FROM_UNIXTIME($date), '$title', '$link')", false);
33 }
33 }
34
34
35 header('Content-Type: text/xml');
35 header('Content-Type: text/xml');
36 header('Content-Length: 440');
36 header('Content-Length: 440');
37 ?>
37 ?>
@@ -54,8 +54,8 function adminmenu($current='') {
54 } else {
54 } else {
55 $curS = $curT = basename( $_SERVER["PHP_SELF"] );
55 $curS = $curT = basename( $_SERVER["PHP_SELF"] );
56 }
56 }
57
57
58
58
59 foreach( $submenu as $l=>$L ) {
59 foreach( $submenu as $l=>$L ) {
60 foreach( $L as $k=>$v ) {
60 foreach( $L as $k=>$v ) {
61 if( $k == $curS ) {
61 if( $k == $curS ) {
@@ -65,11 +65,11 function adminmenu($current='') {
65 }
65 }
66 $current_sub_menu = false;
66 $current_sub_menu = false;
67
67
68 ?>
68 ?>
69 <div id="wphead">
69 <div id="wphead">
70 <h1>Megatokyo Site Administration <span>(<a href="<?php echo SITE_HOST . SITE_PATH; ?>">View site &raquo;</a>)</span></h1>
70 <h1>Megatokyo Site Administration <span>(<a href="<?php echo SITE_HOST . SITE_PATH; ?>">View site &raquo;</a>)</span></h1>
71 </div>
71 </div>
72 <div id="user_info"><p>Howdy, <strong><?php getCurrentUser(); ?></strong>. [<a href="<?php echo ADMIN_PATH;
72 <div id="user_info"><p>Howdy, <strong><?php getCurrentUser(); ?></strong>. [<a href="<?php echo ADMIN_PATH;
73 ?>/login.php?action=logout" title="Log out of this account">Sign Out</a>] </p></div>
73 ?>/login.php?action=logout" title="Log out of this account">Sign Out</a>] </p></div>
74
74
75
75
@@ -94,7 +94,7 function adminmenu($current='') {
94 }
94 }
95 ?>
95 ?>
96
96
97 <div class="clear"></div>
97 <div class="clear"></div>
98
98
99 <?php
99 <?php
100 if( $_GET['deleted'] && $_GET['deleted'] == 'success' ) $info.='<p>Deleted successfully.</p>';
100 if( $_GET['deleted'] && $_GET['deleted'] == 'success' ) $info.='<p>Deleted successfully.</p>';
@@ -104,7 +104,7 function adminmenu($current='') {
104 if( $info ) echo "<div class=\"updated fade\">$info</div>";
104 if( $info ) echo "<div class=\"updated fade\">$info</div>";
105 ?>
105 ?>
106 <div class="wrap">
106 <div class="wrap">
107 <?php
107 <?php
108 }
108 }
109
109
110 function adminfooter($copy = true) {
110 function adminfooter($copy = true) {
@@ -164,7 +164,7 function handle_error($errno, $errstr, $errfile, $errline, $errcontext) {
164 header('Content-Type: text/html; charset=utf-8');
164 header('Content-Type: text/html; charset=utf-8');
165
165
166 if (eregi('^(sql)$', $errstr)) {
166 if (eregi('^(sql)$', $errstr)) {
167 $errstr = "SQL Error " . mysql_errno() . ': ' . mysql_error();
167 $errstr = "SQL Error " . mysqli_errno() . ': ' . mysqli_error();
168 }
168 }
169
169
170 $message = "Error#$errno: $errstr";
170 $message = "Error#$errno: $errstr";
@@ -55,7 +55,7 function twitterpost($message, $user=TWITTER_USER, $password=TWITTER_PASS)
55 function setOAuthTokens($userid,$oauth_token,$oauth_token_secret, $username) {
55 function setOAuthTokens($userid,$oauth_token,$oauth_token_secret, $username) {
56 global $mtdb;
56 global $mtdb;
57 $id = (int)$userid;
57 $id = (int)$userid;
58 if( $mtdb->query( sprintf('UPDATE twitter_user SET oauth_token="%s", oauth_token_secret="%s", username="%s" WHERE id=%d', mysql_real_escape_string($oauth_token), mysql_real_escape_string($oauth_token_secret), mysql_real_escape_string($username), $id )) )
58 if( $mtdb->query( sprintf('UPDATE twitter_user SET oauth_token="%s", oauth_token_secret="%s", username="%s" WHERE id=%d', mysqli_real_escape_string($mtdb->link, $oauth_token), mysqli_real_escape_string($mtdb->link, $oauth_token_secret), mysqli_real_escape_string($mtdb->link, $username), $id )) )
59 return true;
59 return true;
60 return false;
60 return false;
61 }
61 }
@@ -9,7 +9,7 if( isset($_GET['delete']) && (int)$_GET['delete'] ) {
9 if(! $mtdb->query( 'DELETE FROM meta_t WHERE id=' . (int)$_GET['delete'] ) )
9 if(! $mtdb->query( 'DELETE FROM meta_t WHERE id=' . (int)$_GET['delete'] ) )
10 {
10 {
11 adminlog("Error on deleting metatype ".(int)$_GET['delete'], MTS_TYPE_META, MTA_DELETE, E_WARNING);
11 adminlog("Error on deleting metatype ".(int)$_GET['delete'], MTS_TYPE_META, MTA_DELETE, E_WARNING);
12 mtdie("Error on update: ". htmlentities(mysql_error()));
12 mtdie("Error on update: ". htmlentities(mysqli_error()));
13 }
13 }
14 $info.='<p>Deleted metatype successfully.<p>';
14 $info.='<p>Deleted metatype successfully.<p>';
15 adminlog("Metatype ".(int)$_GET['delete']." deleted.", MTS_TYPE_META, MTA_DELETE);
15 adminlog("Metatype ".(int)$_GET['delete']." deleted.", MTS_TYPE_META, MTA_DELETE);
@@ -17,14 +17,14 if( isset($_GET['delete']) && (int)$_GET['delete'] ) {
17
17
18 if( isset($_POST['action']) && $_POST['action'] == 'new_meta' ) {
18 if( isset($_POST['action']) && $_POST['action'] == 'new_meta' ) {
19 check_nonce('new-metatype');
19 check_nonce('new-metatype');
20
20
21 $name = trim($_POST['name']);
21 $name = trim($_POST['name']);
22
22
23 if( check_type_name( $name ) ) {
23 if( check_type_name( $name ) ) {
24 if(! $mtdb->query( 'INSERT INTO meta_t(name) VALUES("'. mysql_real_escape_string($name) . '")' ) )
24 if(! $mtdb->query( 'INSERT INTO meta_t(name) VALUES("'. mysqli_real_escape_string($mtdb->link, $name) . '")' ) )
25 {
25 {
26 adminlog("Error on inserting metatype ".(int)$_GET['delete'], MTS_TYPE_META, MTA_INSERT, E_WARNING);
26 adminlog("Error on inserting metatype ".(int)$_GET['delete'], MTS_TYPE_META, MTA_INSERT, E_WARNING);
27 mtdie("Error on insertion: ". htmlentities(mysql_error()));
27 mtdie("Error on insertion: ". htmlentities(mysqli_error()));
28 }
28 }
29 }
29 }
30 $info.='<p>New metatype created successfully.<p>';
30 $info.='<p>New metatype created successfully.<p>';
@@ -33,14 +33,14 if( isset($_POST['action']) && $_POST['action'] == 'new_meta' ) {
33
33
34 if( isset($_POST['action']) && $_POST['action'] == 'edit_meta' ) {
34 if( isset($_POST['action']) && $_POST['action'] == 'edit_meta' ) {
35 check_nonce('save-metatype-'.(int)$_POST['type_id']);
35 check_nonce('save-metatype-'.(int)$_POST['type_id']);
36
36
37 $name = trim($_POST['name']);
37 $name = trim($_POST['name']);
38
38
39 if( check_type_name( $name ) ) {
39 if( check_type_name( $name ) ) {
40 if(! $mtdb->query( 'UPDATE meta_t SET name = "' . mysql_real_escape_string($name) . '" WHERE id=' . (int)$_POST['type_id']) )
40 if(! $mtdb->query( 'UPDATE meta_t SET name = "' . mysqli_real_escape_string($mtdb->link, $name) . '" WHERE id=' . (int)$_POST['type_id']) )
41 {
41 {
42 adminlog("Error updating metatype ".(int)$_GET['delete'], MTS_TYPE_META, MTA_UPDATE, E_WARNING);
42 adminlog("Error updating metatype ".(int)$_GET['delete'], MTS_TYPE_META, MTA_UPDATE, E_WARNING);
43 mtdie("Error on update: ". htmlentities(mysql_error()));
43 mtdie("Error on update: ". htmlentities(mysqli_error()));
44 }
44 }
45 }
45 }
46 $info.='<p>Changes to metatype saved successfully.<p>';
46 $info.='<p>Changes to metatype saved successfully.<p>';
@@ -96,11 +96,11 adminmenu();
96 <td width="66%"><input name="name" type="text" id="name" value="" /></td>
96 <td width="66%"><input name="name" type="text" id="name" value="" /></td>
97 </tr>
97 </tr>
98 </table>
98 </table>
99
99
100 <p class="submit"><input type="submit" value="Create &raquo;" name="submit" /></p>
100 <p class="submit"><input type="submit" value="Create &raquo;" name="submit" /></p>
101 </div>
101 </div>
102 </form>
102 </form>
103
103
104 <?php
104 <?php
105 adminfooter();
105 adminfooter();
106 ?> No newline at end of file
106 ?>
@@ -36,7 +36,7 function handle_update_form() {
36 return;
36 return;
37 }
37 }
38
38
39 $mtdb->query( 'INSERT INTO status (published,eta,percentage,text) VALUES( NOW(), FROM_UNIXTIME(' . (int)$eta . '), '. (int)$percent . ', "' . mysql_real_escape_string($text) . '")' );
39 $mtdb->query( 'INSERT INTO status (published,eta,percentage,text) VALUES( NOW(), FROM_UNIXTIME(' . (int)$eta . '), '. (int)$percent . ', "' . mysqli_real_escape_string($mtdb->link, $text) . '")' );
40
40
41 $_POST['update_percentage']=$_POST['update_eta']=$_POST['update_text']='';
41 $_POST['update_percentage']=$_POST['update_eta']=$_POST['update_text']='';
42 $info = '<p>Statusbox updated successfully.</p>';
42 $info = '<p>Statusbox updated successfully.</p>';
@@ -87,32 +87,32 $presets = $mtdb->getAll('SELECT COUNT(*) as c, percentage, text, CONCAT( percen
87 <th scope="row">Status Description</th>
87 <th scope="row">Status Description</th>
88 <td width="66%"><textarea name="update_text" row="6" cols="30" id="update_text"><?php echo htmlentities($_POST['update_text']); ?></textarea></td>
88 <td width="66%"><textarea name="update_text" row="6" cols="30" id="update_text"><?php echo htmlentities($_POST['update_text']); ?></textarea></td>
89 </tr>
89 </tr>
90
90
91 <script type="text/javascript">
91 <script type="text/javascript">
92 function PresetHandler( f ) {
92 function PresetHandler( f ) {
93
93
94 var i = f.preset.selectedIndex;
94 var i = f.preset.selectedIndex;
95 var v = f.preset.options[i].value;
95 var v = f.preset.options[i].value;
96
96
97 var parts = v.split("% - ");
97 var parts = v.split("% - ");
98
98
99 if( parts[0] == undefined ) {
99 if( parts[0] == undefined ) {
100 parts[0] = "";
100 parts[0] = "";
101 }
101 }
102 if( parts[1] == undefined ) {
102 if( parts[1] == undefined ) {
103 parts[1] = "";
103 parts[1] = "";
104 }
104 }
105
105
106 f.update_percentage.value = parts[0];
106 f.update_percentage.value = parts[0];
107 f.update_text.value = parts[1];
107 f.update_text.value = parts[1];
108
108
109 return true;
109 return true;
110 }
110 }
111 document.write('<tr><th scope="row">Presets</th><td width="66%"><select name="preset" onchange="PresetHandler(this.form);"><option value="">-none-</option><?php
111 document.write('<tr><th scope="row">Presets</th><td width="66%"><select name="preset" onchange="PresetHandler(this.form);"><option value="">-none-</option><?php
112 foreach( $presets as $p )
112 foreach( $presets as $p )
113 echo '<option value="' . addslashes(htmlentities($p->p)) . '">' . addslashes(htmlentities($p->p)) . '</option>';
113 echo '<option value="' . addslashes(htmlentities($p->p)) . '">' . addslashes(htmlentities($p->p)) . '</option>';
114 ?></select></td></tr>');
114 ?></select></td></tr>');
115
115
116 </script>
116 </script>
117 </table>
117 </table>
118
118
@@ -17,7 +17,7 if( isset($_REQUEST['action']) && 'edit_twitter' == $_REQUEST['action']) {
17
17
18 if(0 == $id && !empty($msg)) {
18 if(0 == $id && !empty($msg)) {
19 // Add a new preset
19 // Add a new preset
20 $mtdb->query( sprintf('INSERT INTO twitter_status (position, message) VALUES (%d, "%s")', $position, mysql_real_escape_string($msg)) );
20 $mtdb->query( sprintf('INSERT INTO twitter_status (position, message) VALUES (%d, "%s")', $position, mysqli_real_escape_string($mtdb->link, $msg)) );
21 adminlog("Added new preset: $msg", MTS_TWITTER, MTA_ADD);
21 adminlog("Added new preset: $msg", MTS_TWITTER, MTA_ADD);
22 } elseif(empty($msg)) {
22 } elseif(empty($msg)) {
23 // Delete an existing preset
23 // Delete an existing preset
@@ -25,7 +25,7 if( isset($_REQUEST['action']) && 'edit_twitter' == $_REQUEST['action']) {
25 adminlog("Removed preset: $id", MTS_TWITTER, MTA_ADD);
25 adminlog("Removed preset: $id", MTS_TWITTER, MTA_ADD);
26 } else {
26 } else {
27 // Modify an existing preset
27 // Modify an existing preset
28 $mtdb->query( sprintf('UPDATE twitter_status SET position = %d, message = "%s" WHERE id = %d', $position, mysql_real_escape_string($msg), $id) );
28 $mtdb->query( sprintf('UPDATE twitter_status SET position = %d, message = "%s" WHERE id = %d', $position, mysqli_real_escape_string($mtdb->link, $msg), $id) );
29 }
29 }
30 }
30 }
31 }
31 }
@@ -6,34 +6,34 auth_redirect(); // Require logged in user to access this page.
6
6
7 if( isset($_POST['action']) && $_POST['action'] == 'new' ) {
7 if( isset($_POST['action']) && $_POST['action'] == 'new' ) {
8 check_nonce('new-twitter-user');
8 check_nonce('new-twitter-user');
9
9
10 if(! $mtdb->query( sprintf('INSERT INTO twitter_user(username) VALUES("%s")', mysql_real_escape_string( md5( microtime() )) ) ) ) {
10 if(! $mtdb->query( sprintf('INSERT INTO twitter_user(username) VALUES("%s")', mysqli_real_escape_string( $mtdb->link, md5( microtime() )) ) ) ) {
11 adminlog("Error on insertion of new twitter user.", MTS_TWITTER, MTA_INSERT, E_WARNING);
11 adminlog("Error on insertion of new twitter user.", MTS_TWITTER, MTA_INSERT, E_WARNING);
12 mtdie("Error on insertion of new twitter user: ". htmlentities(mysql_error()), 'SQL Error');
12 mtdie("Error on insertion of new twitter user: ". htmlentities(mysqli_error()), 'SQL Error');
13 } else {
13 } else {
14 //$name = sanitize_username($_POST['name']);
14 //$name = sanitize_username($_POST['name']);
15
15
16 $id = mysql_insert_id();
16 $id = mysqli_insert_id();
17
17
18 $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
18 $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
19 $request_token = $connection->getRequestToken(OAUTH_CALLBACK . "&id=$id");
19 $request_token = $connection->getRequestToken(OAUTH_CALLBACK . "&id=$id");
20
20
21 if ($connection->http_code !== 200 ) {
21 if ($connection->http_code !== 200 ) {
22 adminlog("Twitter getRequestToken failed. HTTP code: $connection->http_code", MTS_TWITTER, MTA_MODIFY);
22 adminlog("Twitter getRequestToken failed. HTTP code: $connection->http_code", MTS_TWITTER, MTA_MODIFY);
23 mtdie("Could not connect to twitter.com.");
23 mtdie("Could not connect to twitter.com.");
24 }
24 }
25
25
26 echo $id . '<br/>';
26 echo $id . '<br/>';
27
27
28 setOAuthTokens( $id, $request_token['oauth_token'], $request_token['oauth_token_secret'], md5(microtime()) );
28 setOAuthTokens( $id, $request_token['oauth_token'], $request_token['oauth_token_secret'], md5(microtime()) );
29
29
30 adminlog("New twitter user created successfully.", MTS_TWITTER, MTA_ADD);
30 adminlog("New twitter user created successfully.", MTS_TWITTER, MTA_ADD);
31
31
32 $url = $connection->getAuthorizeURL($request_token['oauth_token']);
32 $url = $connection->getAuthorizeURL($request_token['oauth_token']);
33 //echo $url;
33 //echo $url;
34 _redirect($url);
34 _redirect($url);
35 exit();
35 exit();
36
36
37 }
37 }
38 }
38 }
39
39
@@ -41,7 +41,7 if( isset($_REQUEST['action']) && $_REQUEST['action'] == 'twittercallback' && is
41 # twitter userID = ID
41 # twitter userID = ID
42 $id = (int)$_REQUEST['id'];
42 $id = (int)$_REQUEST['id'];
43 $row = $mtdb->getRow( sprintf('SELECT id, username, oauth_token, oauth_token_secret, oauth_access_token FROM twitter_user WHERE id=%d LIMIT 1', $id));
43 $row = $mtdb->getRow( sprintf('SELECT id, username, oauth_token, oauth_token_secret, oauth_access_token FROM twitter_user WHERE id=%d LIMIT 1', $id));
44
44
45 # Compare token in database with token from twitter. If they differ, bail.
45 # Compare token in database with token from twitter. If they differ, bail.
46 if( $row->oauth_token != $_REQUEST['oauth_token'] ) {
46 if( $row->oauth_token != $_REQUEST['oauth_token'] ) {
47 # token is old, drop from database
47 # token is old, drop from database
@@ -53,9 +53,9 if( isset($_REQUEST['action']) && $_REQUEST['action'] == 'twittercallback' && is
53 } else {
53 } else {
54 # token is good, save the new Access Token to the database
54 # token is good, save the new Access Token to the database
55 $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $row->oauth_token, $row->oauth_token_secret);
55 $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $row->oauth_token, $row->oauth_token_secret);
56
56
57 $access_token = $connection->getAccessToken($_REQUEST['oauth_verifier']);
57 $access_token = $connection->getAccessToken($_REQUEST['oauth_verifier']);
58
58
59 if (200 == $connection->http_code) {
59 if (200 == $connection->http_code) {
60 # successful
60 # successful
61 $info.='<p>Successfully obtained OAuth Access Token.</p>';
61 $info.='<p>Successfully obtained OAuth Access Token.</p>';
@@ -66,7 +66,7 if( isset($_REQUEST['action']) && $_REQUEST['action'] == 'twittercallback' && is
66 adminlog("Successfully received OAuth Access Tokens for twitter user.", MTS_TWITTER, MTA_MODIFY, E_WARNING);
66 adminlog("Successfully received OAuth Access Tokens for twitter user.", MTS_TWITTER, MTA_MODIFY, E_WARNING);
67
67
68 //print_r($content);
68 //print_r($content);
69
69
70 } else {
70 } else {
71 # fail
71 # fail
72 if( !$mtdb->query("DELETE FROM twitter_user WHERE id = '$id'") ) {
72 if( !$mtdb->query("DELETE FROM twitter_user WHERE id = '$id'") ) {
@@ -76,7 +76,7 if( isset($_REQUEST['action']) && $_REQUEST['action'] == 'twittercallback' && is
76 $info.='<p>Failed to get OAuth Access Token for ' . $username . '.</p>';
76 $info.='<p>Failed to get OAuth Access Token for ' . $username . '.</p>';
77 adminlog("Failed to get OAuth Access Tokens for twitter user.", MTS_TWITTER, MTA_MODIFY, E_ERROR);
77 adminlog("Failed to get OAuth Access Tokens for twitter user.", MTS_TWITTER, MTA_MODIFY, E_ERROR);
78 }
78 }
79
79
80 }
80 }
81 }
81 }
82
82
@@ -109,14 +109,14 adminmenu();
109 $alternate=false;
109 $alternate=false;
110 foreach( $twitter_users as $s ) {
110 foreach( $twitter_users as $s ) {
111 $alternate=!$alternate;
111 $alternate=!$alternate;
112
112
113 ?>
113 ?>
114 <tr id="twitteruser-<?php echo $s->id; ?>" <?php if($alternate) echo 'class="alternate"'; ?>>
114 <tr id="twitteruser-<?php echo $s->id; ?>" <?php if($alternate) echo 'class="alternate"'; ?>>
115 <th scope="row" style="text-align: center;"><?php echo $s->id; ?></th>
115 <th scope="row" style="text-align: center;"><?php echo $s->id; ?></th>
116 <td><?php echo htmlentities($s->username); ?></td>
116 <td><?php echo htmlentities($s->username); ?></td>
117 <td><?php echo htmlentities($s->oauth_token); ?></td>
117 <td><?php echo htmlentities($s->oauth_token); ?></td>
118 <td><?php echo htmlentities($s->oauth_token_secret); ?></td>
118 <td><?php echo htmlentities($s->oauth_token_secret); ?></td>
119 <td><?php
119 <td><?php
120 $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $s->oauth_token, $s->oauth_token_secret);
120 $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $s->oauth_token, $s->oauth_token_secret);
121 $content = $connection->get('account/verify_credentials');
121 $content = $connection->get('account/verify_credentials');
122 if( isset($content->profile_image_url)) {
122 if( isset($content->profile_image_url)) {
@@ -9,12 +9,12 if( isset($_GET['delete']) && (int)$_GET['delete'] ) {
9 if(! $mtdb->query( 'DELETE FROM strip_t WHERE id=' . (int)$_GET['delete'] ) )
9 if(! $mtdb->query( 'DELETE FROM strip_t WHERE id=' . (int)$_GET['delete'] ) )
10 {
10 {
11 adminlog("Error deleting type ".(int)$_GET['delete'], MTS_TYPE, MTA_DELETE, E_WARNING);
11 adminlog("Error deleting type ".(int)$_GET['delete'], MTS_TYPE, MTA_DELETE, E_WARNING);
12 mtdie("Error on deletion of existing type: " . htmlentities(mysql_error()), 'SQL Error');
12 mtdie("Error on deletion of existing type: " . htmlentities(mysqli_error()), 'SQL Error');
13 }
13 }
14 if(! $mtdb->query( 'DELETE FROM meta WHERE type=' . (int)$_GET['delete'] ) )
14 if(! $mtdb->query( 'DELETE FROM meta WHERE type=' . (int)$_GET['delete'] ) )
15 {
15 {
16 adminlog("Error on deletion of type ".(int)$_GET['delete']."'s metadata.", MTS_TYPE, MTA_DELETE, E_WARNING);
16 adminlog("Error on deletion of type ".(int)$_GET['delete']."'s metadata.", MTS_TYPE, MTA_DELETE, E_WARNING);
17 mtdie("Error on deletion of existing type's metadata: " . htmlentities(mysql_error()), 'SQL Error');
17 mtdie("Error on deletion of existing type's metadata: " . htmlentities(mysqli_error()), 'SQL Error');
18 }
18 }
19 $info.='<p>Deleted type successfully.<p>';
19 $info.='<p>Deleted type successfully.<p>';
20 adminlog("Deleted type ".(int)$_GET['delete'], MTS_TYPE, MTA_DELETE);
20 adminlog("Deleted type ".(int)$_GET['delete'], MTS_TYPE, MTA_DELETE);
@@ -22,15 +22,15 if( isset($_GET['delete']) && (int)$_GET['delete'] ) {
22
22
23 if( isset($_POST['action']) && $_POST['action'] == 'new_type' ) {
23 if( isset($_POST['action']) && $_POST['action'] == 'new_type' ) {
24 check_nonce('new-type');
24 check_nonce('new-type');
25
25
26 $name = trim($_POST['name']);
26 $name = trim($_POST['name']);
27 $desc = trim($_POST['description']);
27 $desc = trim($_POST['description']);
28
28
29 if( check_type_name($name) ) {
29 if( check_type_name($name) ) {
30 if(! $mtdb->query( sprintf( 'INSERT INTO strip_t(name, description) VALUES("%s", "%s")', mysql_real_escape_string($name), mysql_real_escape_string($desc)) ) )
30 if(! $mtdb->query( sprintf( 'INSERT INTO strip_t(name, description) VALUES("%s", "%s")', mysqli_real_escape_string($mtdb->link, $name), mysqli_real_escape_string($mtdb->link, $desc)) ) )
31 {
31 {
32 adminlog("Error on insertion of new type.", MTS_TYPE, MTA_INSERT, E_WARNING);
32 adminlog("Error on insertion of new type.", MTS_TYPE, MTA_INSERT, E_WARNING);
33 mtdie("Error on insertion of new type: ". htmlentities(mysql_error()), 'SQL Error');
33 mtdie("Error on insertion of new type: ". htmlentities(mysqli_error()), 'SQL Error');
34 }
34 }
35 }
35 }
36 $info.='<p>New type created successfully.<p>';
36 $info.='<p>New type created successfully.<p>';
@@ -38,27 +38,27 if( isset($_POST['action']) && $_POST['action'] == 'new_type' ) {
38 }
38 }
39
39
40 if( isset($_POST['action']) && $_POST['action'] == 'edit_type' ) {
40 if( isset($_POST['action']) && $_POST['action'] == 'edit_type' ) {
41
41
42 $id = (int)$_POST['type_id'];
42 $id = (int)$_POST['type_id'];
43 check_nonce("save-type-$id");
43 check_nonce("save-type-$id");
44
44
45 $name = trim($_POST['name']);
45 $name = trim($_POST['name']);
46 $desc = trim($_POST['description']);
46 $desc = trim($_POST['description']);
47
47
48 $meta = $_POST['meta'];
48 $meta = $_POST['meta'];
49
49
50 $m_delete = $mtdb->getAll("SELECT meta FROM meta WHERE type = $id");
50 $m_delete = $mtdb->getAll("SELECT meta FROM meta WHERE type = $id");
51
51
52 $m_insert = array();
52 $m_insert = array();
53
53
54 // Key listed in both Insert and Delete lists, so remove from both == Do Nothing
54 // Key listed in both Insert and Delete lists, so remove from both == Do Nothing
55 foreach( $m_delete as $k=>$v ) {
55 foreach( $m_delete as $k=>$v ) {
56 if( array_key_exists( $v->meta, $meta ) ) {
56 if( array_key_exists( $v->meta, $meta ) ) {
57 unset($m_delete[$k]);
57 unset($m_delete[$k]);
58 unset($meta[$v->meta]);
58 unset($meta[$v->meta]);
59 } else {
59 } else {
60 $m_delete[$k] = 'meta=' . (int)$v->meta;
60 $m_delete[$k] = 'meta=' . (int)$v->meta;
61 }
61 }
62 }
62 }
63
63
64 // Key listed only in Insert list, make proper format
64 // Key listed only in Insert list, make proper format
@@ -67,17 +67,17 if( isset($_POST['action']) && $_POST['action'] == 'edit_type' ) {
67 }
67 }
68
68
69 if( check_type_name( $name ) ) {
69 if( check_type_name( $name ) ) {
70 if( !$mtdb->query( sprintf( 'UPDATE strip_t SET name = "%s", description = "%s" WHERE id = %s', mysql_real_escape_string($name), mysql_real_escape_string($desc), $id)) )
70 if( !$mtdb->query( sprintf( 'UPDATE strip_t SET name = "%s", description = "%s" WHERE id = %s', mysqli_real_escape_string($mtdb->link, $name), mysqli_real_escape_string($mtdb->link, $desc), $id)) )
71 {
71 {
72 adminlog("Error on updating type ".$id, MTS_TYPE, MTA_UPDATE, E_WARNING);
72 adminlog("Error on updating type ".$id, MTS_TYPE, MTA_UPDATE, E_WARNING);
73 mtdie("Error on update of existing type: ". htmlentities(mysql_error()), 'SQL Error');
73 mtdie("Error on update of existing type: ". htmlentities(mysqli_error()), 'SQL Error');
74 }
74 }
75
75
76 $sql_insert = "INSERT INTO meta (type,meta) VALUES " . implode(',',$m_insert);
76 $sql_insert = "INSERT INTO meta (type,meta) VALUES " . implode(',',$m_insert);
77 $sql_delete = "DELETE FROM meta WHERE type=$id AND ( " . implode(' OR ',$m_delete) . ' )';
77 $sql_delete = "DELETE FROM meta WHERE type=$id AND ( " . implode(' OR ',$m_delete) . ' )';
78
78
79 $mtdb->query('START TRANSACTION');
79 $mtdb->query('START TRANSACTION');
80
80
81 if( count($m_insert) )
81 if( count($m_insert) )
82 if(! $mtdb->query( $sql_insert ) )
82 if(! $mtdb->query( $sql_insert ) )
83 {
83 {
@@ -90,9 +90,9 if( isset($_POST['action']) && $_POST['action'] == 'edit_type' ) {
90 adminlog("Error deleting old metatype association data for type ".$id, MTS_TYPE, MTA_REMOVE, E_WARNING);
90 adminlog("Error deleting old metatype association data for type ".$id, MTS_TYPE, MTA_REMOVE, E_WARNING);
91 mtdie("There was an error deleting old metatype data. Transaction aborted. $sql_delete");
91 mtdie("There was an error deleting old metatype data. Transaction aborted. $sql_delete");
92 }
92 }
93
93
94 $mtdb->query('COMMIT');
94 $mtdb->query('COMMIT');
95
95
96 } else {
96 } else {
97 $error.='<p>Invalid type name!</p>';
97 $error.='<p>Invalid type name!</p>';
98 }
98 }
@@ -129,13 +129,13 adminmenu();
129 $alternate=false;
129 $alternate=false;
130 foreach( $types as $s ) {
130 foreach( $types as $s ) {
131 $alternate=!$alternate;
131 $alternate=!$alternate;
132
132
133 $metas = $mtdb->getAll("SELECT meta_t.name AS name FROM strip_t
133 $metas = $mtdb->getAll("SELECT meta_t.name AS name FROM strip_t
134 JOIN meta ON meta.type = strip_t.id JOIN meta_t ON meta.meta = meta_t.id
134 JOIN meta ON meta.type = strip_t.id JOIN meta_t ON meta.meta = meta_t.id
135 WHERE strip_t.id = $s->id");
135 WHERE strip_t.id = $s->id");
136
136
137 $meta = implode(', ', array_map('_getMetaNameFromObject', $metas) );
137 $meta = implode(', ', array_map('_getMetaNameFromObject', $metas) );
138
138
139 ?>
139 ?>
140 <tr id="comic-<?php echo $s->id; ?>" <?php if($alternate) echo 'class="alternate"'; ?>>
140 <tr id="comic-<?php echo $s->id; ?>" <?php if($alternate) echo 'class="alternate"'; ?>>
141 <th scope="row" style="text-align: center;"><?php echo $s->id; ?></th>
141 <th scope="row" style="text-align: center;"><?php echo $s->id; ?></th>
@@ -169,7 +169,7 adminmenu();
169 <td width="66%"><input name="description" type="text" id="description" value="" /></td>
169 <td width="66%"><input name="description" type="text" id="description" value="" /></td>
170 </tr>
170 </tr>
171 </table>
171 </table>
172
172
173 <p class="submit"><input type="submit" value="Create &raquo;" name="submit" /></p>
173 <p class="submit"><input type="submit" value="Create &raquo;" name="submit" /></p>
174 </div>
174 </div>
175 </form>
175 </form>
@@ -6,7 +6,7 auth_redirect(); // Require logged in user to access this page.
6
6
7 check_nonce('new-scratchpad');
7 check_nonce('new-scratchpad');
8
8
9 $mtdb->query( sprintf( 'INSERT INTO scratchpad (contributor, message) VALUES (%d, "%s")', (int)$currentuser->id, mysql_real_escape_string($_REQUEST['message'])) );
9 $mtdb->query( sprintf( 'INSERT INTO scratchpad (contributor, message) VALUES (%d, "%s")', (int)$currentuser->id, mysqli_real_escape_string($mtdb->link, $_REQUEST['message'])) );
10
10
11 adminlog("User posted to scratchpad.", MTS_SCRATCH, MTA_INSERT);
11 adminlog("User posted to scratchpad.", MTS_SCRATCH, MTA_INSERT);
12 _redirect( ADMIN_PATH . '/index.php' );
12 _redirect( ADMIN_PATH . '/index.php' );
@@ -8,7 +8,7 auth_redirect(); // Require logged in user to access this page.
8 if('post_twitter' == $_REQUEST['action'])
8 if('post_twitter' == $_REQUEST['action'])
9 {
9 {
10 check_nonce('new-twitter');
10 check_nonce('new-twitter');
11
11
12 $postmessage = '';
12 $postmessage = '';
13 if(!empty($_REQUEST['stdmessage']) ) $postmessage = trim($_REQUEST['stdmessage']);
13 if(!empty($_REQUEST['stdmessage']) ) $postmessage = trim($_REQUEST['stdmessage']);
14 if( strlen($_REQUEST['message']) ) $postmessage = trim($_REQUEST['message']);
14 if( strlen($_REQUEST['message']) ) $postmessage = trim($_REQUEST['message']);
@@ -20,13 +20,13 if('post_twitter' == $_REQUEST['action'])
20
20
21 if('' == $postmessage) _redirect( ADMIN_PATH . '/post-twitter.php?tweet=missing');
21 if('' == $postmessage) _redirect( ADMIN_PATH . '/post-twitter.php?tweet=missing');
22 $username = sanitize_username($_REQUEST['twitter_user']);
22 $username = sanitize_username($_REQUEST['twitter_user']);
23 $postasuser = $mtdb->getOne( sprintf('SELECT username FROM twitter_user WHERE username="%s"', mysql_real_escape_string($username)));
23 $postasuser = $mtdb->getOne( sprintf('SELECT username FROM twitter_user WHERE username="%s"', mysqli_real_escape_string($mtdb->link, $username)));
24
24
25 if( in_array('twitter', $_REQUEST['service']) )
25 if( in_array('twitter', $_REQUEST['service']) )
26 $rc = twitterpost( numeric_entities(utfentities($postmessage)), $postasuser );
26 $rc = twitterpost( numeric_entities(utfentities($postmessage)), $postasuser );
27 if( in_array('rss', $_REQUEST['service']) )
27 if( in_array('rss', $_REQUEST['service']) )
28 $rc = rsspost( numeric_entities(utfentities($postmessage)), SITE_HOST.SITE_PATH );
28 $rc = rsspost( numeric_entities(utfentities($postmessage)), SITE_HOST.SITE_PATH );
29
29
30 if($rc) _redirect( ADMIN_PATH . '/post-twitter.php?tweet=success');
30 if($rc) _redirect( ADMIN_PATH . '/post-twitter.php?tweet=success');
31 _redirect( ADMIN_PATH . '/post-twitter.php?tweet=fail');
31 _redirect( ADMIN_PATH . '/post-twitter.php?tweet=fail');
32
32
@@ -41,7 +41,7 if( isset($_REQUEST['tweet']) && 'fail' == $_REQUEST['tweet'] )
41
41
42 if( isset($_REQUEST['tweet']) && 'missing' == $_REQUEST['tweet'] )
42 if( isset($_REQUEST['tweet']) && 'missing' == $_REQUEST['tweet'] )
43 $error.='Oops~ Looks like you forgot to enter a message.';
43 $error.='Oops~ Looks like you forgot to enter a message.';
44
44
45
45
46 $statuses = $mtdb->getAll('SELECT id, position, message FROM twitter_status ORDER BY position, id');
46 $statuses = $mtdb->getAll('SELECT id, position, message FROM twitter_status ORDER BY position, id');
47 $twitter_users = $mtdb->getAll('SELECT id, username, oauth_token, oauth_token_secret, oauth_access_token FROM twitter_user ORDER BY username');
47 $twitter_users = $mtdb->getAll('SELECT id, username, oauth_token, oauth_token_secret, oauth_access_token FROM twitter_user ORDER BY username');
@@ -98,7 +98,7 adminmenu();
98 var charactersremaining = document.getElementById('charactersremaining');
98 var charactersremaining = document.getElementById('charactersremaining');
99 charactersremaining.innerHTML = 140 - status.value.length
99 charactersremaining.innerHTML = 140 - status.value.length
100 }
100 }
101 -->
101 -->
102 </script>
102 </script>
103
103
104 <?php /*?>
104 <?php /*?>
@@ -37,7 +37,7 foreach($tweets as $t)
37 adminlog("Error $ret_code posting scheduled tweet ".$t->id . ' with return value ' . $ret, MTS_TWITTER, MTA_ADD);
37 adminlog("Error $ret_code posting scheduled tweet ".$t->id . ' with return value ' . $ret, MTS_TWITTER, MTA_ADD);
38 $t->status = 'error';
38 $t->status = 'error';
39 }
39 }
40
40
41 // Unlock tweet, update db.
41 // Unlock tweet, update db.
42 $mtdb->query("UPDATE twitter_post SET status = '".mysql_real_escape_string($t->status)."' WHERE status = 'locked' AND id = ".(int)$t->id, false);
42 $mtdb->query("UPDATE twitter_post SET status = '".mysqli_real_escape_string($mtdb->link, $t->status)."' WHERE status = 'locked' AND id = ".(int)$t->id, false);
43 }
43 }
@@ -12,10 +12,10 if( isset($_POST['edit']) ) {
12 $username = sanitize_username( $_POST['user_login'] );
12 $username = sanitize_username( $_POST['user_login'] );
13 if( $username != $_POST['user_login'] || strlen($_POST['user_login']) < 1 )
13 if( $username != $_POST['user_login'] || strlen($_POST['user_login']) < 1 )
14 mtdie( 'The specified username is not valid. Must be composed of a-z _ - @ .', 'Invalid Username' );
14 mtdie( 'The specified username is not valid. Must be composed of a-z _ - @ .', 'Invalid Username' );
15
15
16 copy(RANTIMG.'default', RANTIMG.$username.'.png');
16 copy(RANTIMG.'default', RANTIMG.$username.'.png');
17
17
18 $mtdb->query( 'INSERT INTO contributor (name, default_image) VALUES ("' . mysql_real_escape_string($username) . '", "'.$username.'.png")' );
18 $mtdb->query( 'INSERT INTO contributor (name, default_image) VALUES ("' . mysqli_real_escape_string($mtdb->link, $username) . '", "'.$username.'.png")' );
19 $user = get_userdatabylogin( $username );
19 $user = get_userdatabylogin( $username );
20 $userid = $user->id;
20 $userid = $user->id;
21 $info.='<p>User Account Created</p>';
21 $info.='<p>User Account Created</p>';
@@ -25,19 +25,19 if( isset($_POST['edit']) ) {
25 $userid = (int) $_POST['edit'];
25 $userid = (int) $_POST['edit'];
26 $user_old = $user = get_userdatabyid( $userid );
26 $user_old = $user = get_userdatabyid( $userid );
27 }
27 }
28
28
29 $user->nameplate = $_POST['nickname'];
29 $user->nameplate = $_POST['nickname'];
30 $user->default_image = $user_old->default_image;
30 $user->default_image = $user_old->default_image;
31 $user->default_link = $_POST['rant-link'];
31 $user->default_link = $_POST['rant-link'];
32 $user->email = $_POST['email'];
32 $user->email = $_POST['email'];
33
33
34 if( !empty($_POST['password_new1']) && !empty($_POST['password_new2']) ) {
34 if( !empty($_POST['password_new1']) && !empty($_POST['password_new2']) ) {
35
35
36 if( $_POST['password_new1'] !== $_POST['password_new2'] ) {
36 if( $_POST['password_new1'] !== $_POST['password_new2'] ) {
37 $error.='<p>New passwords do not match.</p>';
37 $error.='<p>New passwords do not match.</p>';
38 } else {
38 } else {
39 /* password change */
39 /* password change */
40 if( ! $mtdb->getOne( 'SELECT id FROM contributor WHERE id = "' . (int)$user->id . '" AND (password = SHA1("' . mysql_real_escape_string($_POST['password_old']) . '") OR password = "")' )) {
40 if( ! $mtdb->getOne( 'SELECT id FROM contributor WHERE id = "' . (int)$user->id . '" AND (password = SHA1("' . mysqli_real_escape_string($mtdb->link, $_POST['password_old']) . '") OR password = "")' )) {
41 $error.='<p>Specified password is incorrect.</p>';
41 $error.='<p>Specified password is incorrect.</p>';
42 } else {
42 } else {
43 /* Password match */
43 /* Password match */
@@ -50,13 +50,13 if( isset($_POST['edit']) ) {
50
50
51 function handle_upload( &$user ) {
51 function handle_upload( &$user ) {
52 global $info,$error;
52 global $info,$error;
53
53
54 if( !$_FILES['rant_image'] ) return;
54 if( !$_FILES['rant_image'] ) return;
55
55
56 if( '' == $_FILES['rant_image']['name'] ) return;
56 if( '' == $_FILES['rant_image']['name'] ) return;
57 if( UPLOAD_ERR_NO_FILE == $_FILES['rant_image']['error'] ) return;
57 if( UPLOAD_ERR_NO_FILE == $_FILES['rant_image']['error'] ) return;
58 if( 0 == $_FILES['rant_image']['size'] ) return;
58 if( 0 == $_FILES['rant_image']['size'] ) return;
59
59
60 $info.='<p>Tried to upload an image.</p>';
60 $info.='<p>Tried to upload an image.</p>';
61 // Uploading new rant image
61 // Uploading new rant image
62 $imagedata = getimagesize($_FILES['rant_image']['tmp_name']);
62 $imagedata = getimagesize($_FILES['rant_image']['tmp_name']);
@@ -68,7 +68,7 if( isset($_POST['edit']) ) {
68 $error.='<p>Image wrong height: '.$imagedata[1].'</p>';
68 $error.='<p>Image wrong height: '.$imagedata[1].'</p>';
69 return;
69 return;
70 }
70 }
71
71
72 switch( $_FILES['rant_image']['type'] ) {
72 switch( $_FILES['rant_image']['type'] ) {
73 case 'image/jpeg':
73 case 'image/jpeg':
74 case 'image/jpg': $ext = 'jpg'; break;
74 case 'image/jpg': $ext = 'jpg'; break;
@@ -80,7 +80,7 if( isset($_POST['edit']) ) {
80 $error.='<p>Unknown image extension. Upload refused.</p>';
80 $error.='<p>Unknown image extension. Upload refused.</p>';
81 return;
81 return;
82 }
82 }
83
83
84 $destination_path = $user->name.'.'.$ext;
84 $destination_path = $user->name.'.'.$ext;
85 if( !is_uploaded_file( $_FILES['rant_image']['tmp_name'] )) {
85 if( !is_uploaded_file( $_FILES['rant_image']['tmp_name'] )) {
86 $error.='<p>Something went wrong while retrieving the uploaded image.</p>';
86 $error.='<p>Something went wrong while retrieving the uploaded image.</p>';
@@ -103,8 +103,8 if( isset($_POST['edit']) ) {
103 } else {
103 } else {
104 $userid = (int) $_GET['edit'];
104 $userid = (int) $_GET['edit'];
105 $user = get_userdatabyid( $userid );
105 $user = get_userdatabyid( $userid );
106 }
106 }
107
107
108 if( !$user ) $error.='<p>The specified user does not exist.</p>';
108 if( !$user ) $error.='<p>The specified user does not exist.</p>';
109
109
110 adminhead('Edit User Profile');
110 adminhead('Edit User Profile');
@@ -54,13 +54,13 $users = $mtdb->getAll("SELECT id,name,email,nameplate FROM contributor");
54
54
55 <h2>Create New Contributor</h2>
55 <h2>Create New Contributor</h2>
56 <div class="narrow">
56 <div class="narrow">
57 <table class="editform" width="100% cellspacing="2" cellpadding="5">
57 <table class="editform" width="100%" cellspacing="2" cellpadding="5">
58 <tr>
58 <tr>
59 <th scope="row" width="33%">Username</th>
59 <th scope="row" width="33%">Username</th>
60 <td width="66%"><input name="user_login" type="text" id="user_login" value="" /></th>
60 <td width="66%"><input name="user_login" type="text" id="user_login" value="" /></th>
61 </tr>
61 </tr>
62 </table>
62 </table>
63
63
64 <p class="submit"><input type="submit" value="Create &raquo;" name="submit" /></p>
64 <p class="submit"><input type="submit" value="Create &raquo;" name="submit" /></p>
65 </div>
65 </div>
66 </form>
66 </form>
Comments 0
You need to be logged in to leave comments. Login now