Changeset 647
- Timestamp:
- 10/19/06 02:45:05 (2 years ago)
- Files:
-
- devel/lib/dbsetup.php (modified) (1 diff)
- devel/lib/templates.php (modified) (24 diffs)
- devel/lib/userlib.php (modified) (1 diff)
- devel/mod/browser/index.php (modified) (7 diffs)
- devel/units/templates/templates_view.php (modified) (4 diffs)
- devel/units/weblogs/weblogs_friends_view.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/lib/dbsetup.php
r556 r647 33 33 notify("WARNING: the initial password for the news account is 'password'. This account has administrator privileges, and you should log in and change the password as soon as installation is complete."); 34 34 } else { 35 $newspassword = $db->qstr(md5($CFG->newsinitialpassword)); 36 execute_sql("update ".$CFG->prefix."users set password = $newspassword where username = 'news'"); 35 //$newspassword = $db->qstr(md5($CFG->newsinitialpassword)); 36 //execute_sql("update ".$CFG->prefix."users set password = $newspassword where username = 'news'"); 37 set_field('users', 'password', md5($CFG->newsinitialpassword), 'username', 'news'); 37 38 } 38 execute_sql("update ".$CFG->prefix."users set email = ". $db->qstr($CFG->sysadminemail) ." where username = 'news'"); 39 //execute_sql("update ".$CFG->prefix."users set email = ". $db->qstr($CFG->sysadminemail) ." where username = 'news'"); 40 set_field('users', 'email', $CFG->sysadminemail, 'username', 'news'); 39 41 } else { 40 42 $db->debug = false; devel/lib/templates.php
r640 r647 1 <?php 1 <?php 2 2 3 3 /*** NZVLE TODO … … 102 102 <p style="margin-bottom: 3px" class="usermenu">{{usermenu}}</p> 103 103 </div> 104 </div> 104 </div> 105 105 106 106 END; … … 126 126 </td> 127 127 </tr> 128 </table><br /> 128 </table><br /> 129 129 END; 130 130 … … 157 157 <p> 158 158 {{message}} 159 </p> 159 </p> 160 160 161 161 END; … … 402 402 'html' => templates_draw(array( 'context' => 'submenuitem', 403 403 'name' => gettext("Change theme"), 404 'location' => url . '_templates/'))); 405 } 406 407 return $run_result; 408 } 409 410 function templates_page_setup (){ 404 'location' => url . '_templates/'))); 405 } 406 407 return $run_result; 408 } 409 410 function templates_page_setup (){ 411 411 412 412 global $PAGE; … … 425 425 if (isadmin()) { 426 426 $PAGE->menu_top [] = array( 'name' => 'admin', 427 //'html' => a_href("{$CFG->wwwroot}_admin/", 427 //'html' => a_href("{$CFG->wwwroot}_admin/", 428 428 // "Administration")); 429 429 'html' => "<li><a href=\"" . $CFG->wwwroot . "_admin/\">" . gettext("Administration") . "</a></li>"); … … 432 432 $PAGE->menu_top[] = array( 433 433 'name' => 'userdetails', 434 //'html' => a_href("{$CFG->wwwroot}_userdetails/", 434 //'html' => a_href("{$CFG->wwwroot}_userdetails/", 435 435 // "Account settings")); 436 436 'html' => "<li><a href=\"" . $CFG->wwwroot . "_userdetails/\">" . gettext("Account settings") . "</a></li>"); … … 545 545 'top' => displaymenu_top(), 546 546 'sidebar' => $sidebarhtml, 547 'mainbody' => $mainbody, 547 'mainbody' => $mainbody, 548 548 'messageshell' => $messageshell 549 549 )); 550 550 551 return $run_result; 551 return $run_result; 552 552 } 553 553 … … 569 569 570 570 switch ($action) { 571 case "templates:select": 571 case "templates:select": 572 572 $id = optional_param('selected_template',0,PARAM_INT); 573 573 if ($id == -1) { … … 616 616 } 617 617 break; 618 case "deletetemplate": 618 case "deletetemplate": 619 619 $id = optional_param('delete_template_id',0,PARAM_INT); 620 620 unset($_SESSION['template_element_cache'][$id]); 621 621 $exists = record_exists('templates','ident',$id,'owner',$USER->ident); 622 622 if ($exists) { 623 $db->execute('UPDATE '.$CFG->prefix.'users SET template_id = -1 WHERE template_id = '.$id); 623 //$db->execute('UPDATE '.$CFG->prefix.'users SET template_id = -1 WHERE template_id = '.$id); 624 set_field('users', 'template_id', -1, 'template_id', $id); 624 625 delete_records('template_elements','template_id',$id); 625 626 delete_records('template','ident',$id); … … 696 697 // Grab the template content 697 698 if ($template_id == -1 || ($parameter['context'] != "css" && $parameter['context'] != "pageshell")) { 698 $template_element = $template[$parameter['context']]; 699 $template_element = $template[$parameter['context']]; 699 700 } else { 700 701 $template_context = addslashes($parameter['context']); … … 760 761 761 762 <select name="template_based_on"> 762 <option value="-1">$default</option> 763 <option value="-1">$default</option> 763 764 END; 764 765 … … 903 904 <input type="hidden" name="save_template_id" value="$template_id" /> 904 905 <input type="submit" value="$save" /> 905 </p> 906 </p> 906 907 907 908 END; … … 1056 1057 </h3> 1057 1058 <p> 1058 $desc2 1059 $desc2 1059 1060 </p> 1060 1061 1061 1062 END; 1062 1063 1063 foreach($templates as $template) { 1064 foreach($templates as $template) { 1064 1065 $name = "<input type='radio' name='selected_template' value='".$template->ident."'"; 1065 1066 if ($template->ident == $user_template) { … … 1086 1087 1087 1088 <p> 1088 <input type="submit" value= $submitValue/>1089 <input type="submit" value="$submitValue" /> 1089 1090 <input type="hidden" name="action" value="templates:select" /> 1090 1091 </p> … … 1095 1096 1096 1097 $run_result .= $panel; 1097 return $run_result; 1098 return $run_result; 1098 1099 } 1099 1100 … … 1130 1131 switch($template_variable) { 1131 1132 1132 case "username": 1133 case "username": 1133 1134 if (logged_on) { 1134 1135 return $_SESSION['username']; … … 1144 1145 } 1145 1146 break; 1146 case "userfullname": 1147 case "userfullname": 1147 1148 if (logged_on) { 1148 1149 return htmlspecialchars($_SESSION['name'], ENT_COMPAT, 'utf-8'); 1149 1150 } else { 1150 return gettext("Guest") 1151 . " [<a href=\"".url."login/index.php\">" . gettext("Log in") . "</a>]"; 1152 } 1153 break; 1154 case "menu": 1151 return gettext("Guest") . " [<a href=\"".url."login/index.php\">" . gettext("Log in") . "</a>]"; 1152 } 1153 break; 1154 case "menu": 1155 1155 if (logged_on) { 1156 1156 return templates_draw(array( … … 1161 1161 break; 1162 1162 1163 case "submenu": 1163 case "submenu": 1164 1164 return templates_draw(array( 1165 1165 'submenuitems' => menu_join(' | ', $PAGE->menu_sub), … … 1168 1168 break; 1169 1169 1170 case "topmenu": 1170 case "topmenu": 1171 1171 if (logged_on) { 1172 1172 return templates_draw(array( … … 1177 1177 break; 1178 1178 1179 case "url": 1179 case "url": 1180 1180 return url; 1181 1181 break; … … 1263 1263 1264 1264 $result .= <<< END 1265 <table width="550px" border="0" cellpadding="0" cellspacing="0">1266 <tr>1265 <table width="550px" border="0" cellpadding="0" cellspacing="0"> 1266 <tr> 1267 1267 END; 1268 1268 … … 1272 1272 $result .= <<< END 1273 1273 1274 <td align="center">1275 <div class="image_holder">1276 <a href="{$CFG->wwwroot}{$user->username}/"><img src="{$CFG->wwwroot}{$user->username}/icons/{$user->iconid}/w/80/h/80" border="0" /></a>1277 </div> 1278 <div class="userdetails">1279 <p><a href="{$CFG->wwwroot}{$user->username}/">{$user->name}</a></p> 1274 <td align="center"> 1275 <div class="image_holder"> 1276 <a href="{$CFG->wwwroot}{$user->username}/"><img src="{$CFG->wwwroot}{$user->username}/icons/{$user->iconid}/w/80/h/80" border="0" /></a> 1277 </div> 1278 <div class="userdetails"> 1279 <p><a href="{$CFG->wwwroot}{$user->username}/">{$user->name}</a></p> 1280 1280 </div> 1281 1281 END; 1282 1282 } 1283 1283 1284 1284 $result .= <<< END 1285 1285 <tr> … … 1314 1314 $result = ""; 1315 1315 $tags = get_records_sql("SELECT tag, count(ident) as numtags FROM `".$CFG->prefix."tags` WHERE access = 'public' and tag!='' group by tag having numtags > 1 order by ident desc limit 20"); 1316 $max = 0;1316 $max = 0; 1317 1317 foreach($tags as $tag) { 1318 1318 if ($tag->numtags > $max) { devel/lib/userlib.php
r646 r647 251 251 252 252 global $CFG; 253 execute_sql("update ".$CFG->prefix."messages set status = 'read' where to_id = $user_id",false); 253 //execute_sql("update ".$CFG->prefix."messages set status = 'read' where to_id = $user_id",false); 254 set_field('messages', 'status', 'read', 'to_id', $user_id); 254 255 255 256 } devel/mod/browser/index.php
r641 r647 88 88 $body .= <<< END 89 89 90 <p><b>$browse ::</b>91 92 <a href="index.php?display=all&searchtype=$searchtype&filter=$filter" $allunderline>$all</a> |93 <a href="index.php?display=users&searchtype=$searchtype&filter=$filter" $userunderline>$users</a> |94 <a href="index.php?display=communities&searchtype=$searchtype&filter=$filter" $communitiesunderline>$communities</a> |95 90 <p><b>$browse ::</b> 91 92 <a href="index.php?display=all&searchtype=$searchtype&filter=$filter" $allunderline>$all</a> | 93 <a href="index.php?display=users&searchtype=$searchtype&filter=$filter" $userunderline>$users</a> | 94 <a href="index.php?display=communities&searchtype=$searchtype&filter=$filter" $communitiesunderline>$communities</a> | 95 96 96 <form action="index.php" method="get"> 97 <p>$filter_text : <input type="textbox" size="60" name="filter" value="$displayfilter" /><input type="hidden" name="display" value="{$display}" /> <input type="submit" value="$filter_text >>" /></p>98 </form>97 <p>$filter_text : <input type="textbox" size="60" name="filter" value="$displayfilter" /><input type="hidden" name="display" value="{$display}" /> <input type="submit" value="$filter_text >>" /></p> 98 </form> 99 99 100 100 END; … … 105 105 106 106 case "communities": 107 if (empty($filter)) {108 $search_sql = "SELECT u.*, count(distinct m.ident) as members FROM `".$CFG->prefix."users` u join ".$CFG->prefix."friends m on m.friend = u.ident where u.user_type = \"community\" group by u.ident order by members desc, name desc";109 $count_sql = "SELECT count( distinct u.ident) as numberofusers, count(distinct m.ident) as members FROM `".$CFG->prefix."users` u join ".$CFG->prefix."friends m on m.friend = u.ident where u.user_type = \"community\" group byu.ident";110 } else {111 if (empty($searchtype)) {112 $search_sql = "SELECT distinct u.*, count(distinct m.ident) as members from ".$CFG->prefix."tags t join ".$CFG->prefix."users u on u.ident = t.owner join ".$CFG->prefix."friends m on m.friend = u.ident where ($access_string) and t.tag = $formatted_filter and u.user_type = 'community' group by u.ident order by members desc, name desc";113 $count_sql = "SELECT count( distinct u.ident) as numberofusers, count(distinct m.ident) as members from ".$CFG->prefix."tags t join ".$CFG->prefix."users u on u.ident = t.owner join ".$CFG->prefix."friends m on m.friend = u.ident where ($access_string) and t.tag = $formatted_filter andu.user_type = 'community'";114 }115 }116 break;107 if (empty($filter)) { 108 $search_sql = "SELECT u.*, COUNT(DISTINCT m.ident) AS members FROM `".$CFG->prefix."users` u JOIN ".$CFG->prefix."friends m ON m.friend = u.ident WHERE u.user_type = \"community\" GROUP BY u.ident ORDER BY members DESC, name DESC"; 109 $count_sql = "SELECT COUNT(DISTINCT u.ident) AS numberofusers, COUNT(DISTINCT m.ident) AS members FROM `".$CFG->prefix."users` u JOIN ".$CFG->prefix."friends m ON m.friend = u.ident WHERE u.user_type = \"community\" GROUP BY u.ident"; 110 } else { 111 if (empty($searchtype)) { 112 $search_sql = "SELECT DISTINCT u.*, COUNT(DISTINCT m.ident) AS members FROM ".$CFG->prefix."tags t JOIN ".$CFG->prefix."users u ON u.ident = t.owner JOIN ".$CFG->prefix."friends m ON m.friend = u.ident WHERE ($access_string) AND t.tag = $formatted_filter AND u.user_type = 'community' GROUP BY u.ident ORDER BY members DESC, name DESC"; 113 $count_sql = "SELECT COUNT(DISTINCT u.ident) AS numberofusers, COUNT(DISTINCT m.ident) AS members FROM ".$CFG->prefix."tags t JOIN ".$CFG->prefix."users u ON u.ident = t.owner JOIN ".$CFG->prefix."friends m ON m.friend = u.ident WHERE ($access_string) AND t.tag = $formatted_filter AND u.user_type = 'community'"; 114 } 115 } 116 break; 117 117 case "users": 118 if (empty($filter)) {119 $search_sql = "SELECT u.*, count(distinct m.ident) as members FROM `".$CFG->prefix."users` u join ".$CFG->prefix."friends m on m.friend = u.ident where u.user_type = \"person\" group by u.ident order by members desc, name desc";120 $count_sql = "SELECT count( distinct u.ident) as numberofusers, count(distinct m.ident) as members FROM `".$CFG->prefix."users` u join ".$CFG->prefix."friends m on m.friend = u.ident whereu.user_type = \"person\"";121 } else {122 if (empty($searchtype)) {123 $search_sql = "SELECT distinct u.*, count(distinct m.ident) as members from ".$CFG->prefix."tags t join ".$CFG->prefix."users u on u.ident = t.owner join ".$CFG->prefix."friends m on m.friend = u.ident where ($access_string) and t.tag = $formatted_filter and u.user_type = 'person' group by u.ident order by members desc, name desc";124 $count_sql = "SELECT count( distinct u.ident) as numberofusers, count(distinct m.ident) as members from ".$CFG->prefix."tags t join ".$CFG->prefix."users u on u.ident = t.owner join ".$CFG->prefix."friends m on m.friend = u.ident where ($access_string) and t.tag = $formatted_filter andu.user_type = 'person'";125 }126 }127 break;118 if (empty($filter)) { 119 $search_sql = "SELECT u.*, COUNT(DISTINCT m.ident) AS members FROM `".$CFG->prefix."users` u JOIN ".$CFG->prefix."friends m ON m.friend = u.ident WHERE u.user_type = \"person\" GROUP BY u.ident ORDER BY members DESC, name DESC"; 120 $count_sql = "SELECT COUNT(DISTINCT u.ident) AS numberofusers, COUNT(DISTINCT m.ident) AS members FROM `".$CFG->prefix."users` u JOIN ".$CFG->prefix."friends m ON m.friend = u.ident WHERE u.user_type = \"person\""; 121 } else { 122 if (empty($searchtype)) { 123 $search_sql = "SELECT DISTINCT u.*, COUNT(DISTINCT m.ident) AS members FROM ".$CFG->prefix."tags t JOIN ".$CFG->prefix."users u ON u.ident = t.owner JOIN ".$CFG->prefix."friends m ON m.friend = u.ident WHERE ($access_string) AND t.tag = $formatted_filter AND u.user_type = 'person' GROUP BY u.ident ORDER BY members DESC, name DESC"; 124 $count_sql = "SELECT COUNT(DISTINCT u.ident) AS numberofusers, COUNT(DISTINCT m.ident) AS members FROM ".$CFG->prefix."tags t JOIN ".$CFG->prefix."users u ON u.ident = t.owner JOIN ".$CFG->prefix."friends m ON m.friend = u.ident WHERE ($access_string) AND t.tag = $formatted_filter AND u.user_type = 'person'"; 125 } 126 } 127 break; 128 128 default: 129 if (empty($filter)) {130 $search_sql = "SELECT u.*, count(distinct m.ident) as members FROM `".$CFG->prefix."users` u join ".$CFG->prefix."friends m on m.friend = u.ident group by u.ident order by members desc, name desc";131 $count_sql = "SELECT count( distinct u.ident) as numberofusers, count(distinct m.ident) as members FROM `".$CFG->prefix."users` u join ".$CFG->prefix."friends m onm.friend = u.ident ";132 } else {133 if (empty($searchtype)) {134 $search_sql = "SELECT distinct u.*, count(distinct m.ident) as members from ".$CFG->prefix."tags t join ".$CFG->prefix."users u on u.ident = t.owner join ".$CFG->prefix."friends m on m.friend = u.ident where ($access_string) and t.tag = $formatted_filter group by u.ident order by members desc, name desc";135 $count_sql = "SELECT count( distinct u.ident) as numberofusers, count(distinct m.ident) as members from ".$CFG->prefix."tags t join ".$CFG->prefix."users u on u.ident = t.owner join ".$CFG->prefix."friends m on m.friend = u.ident where ($access_string) andt.tag = $formatted_filter";136 }137 }138 break;129 if (empty($filter)) { 130 $search_sql = "SELECT u.*, COUNT(DISTINCT m.ident) AS members FROM `".$CFG->prefix."users` u JOIN ".$CFG->prefix."friends m ON m.friend = u.ident GROUP BY u.ident ORDER BY members DESC, name DESC"; 131 $count_sql = "SELECT COUNT(DISTINCT u.ident) AS numberofusers, COUNT(DISTINCT m.ident) AS members FROM `".$CFG->prefix."users` u JOIN ".$CFG->prefix."friends m ON m.friend = u.ident "; 132 } else { 133 if (empty($searchtype)) { 134 $search_sql = "SELECT DISTINCT u.*, COUNT(DISTINCT m.ident) AS members FROM ".$CFG->prefix."tags t JOIN ".$CFG->prefix."users u ON u.ident = t.owner JOIN ".$CFG->prefix."friends m ON m.friend = u.ident WHERE ($access_string) AND t.tag = $formatted_filter GROUP BY u.ident ORDER BY members DESC, name DESC"; 135 $count_sql = "SELECT COUNT(DISTINCT u.ident) AS numberofusers, COUNT(DISTINCT m.ident) AS members FROM ".$CFG->prefix."tags t JOIN ".$CFG->prefix."users u ON u.ident = t.owner JOIN ".$CFG->prefix."friends m ON m.friend = u.ident WHERE ($access_string) AND t.tag = $formatted_filter"; 136 } 137 } 138 break; 139 139 140 140 } … … 147 147 148 148 if ($displayicons) { 149 $icontoggle = "<a href=\"index.php?display=$display& searchtype=$searchtype&filter=$filter&displayicons=0\">Hide icons</a>";149 $icontoggle = "<a href=\"index.php?display=$display&searchtype=$searchtype&filter=$filter&displayicons=0\">Hide icons</a>"; 150 150 } else { 151 $icontoggle = "<a href=\"index.php?display=$display& searchtype=$searchtype&filter=$filter&displayicons=1\">Show icons</a>";151 $icontoggle = "<a href=\"index.php?display=$display&searchtype=$searchtype&filter=$filter&displayicons=1\">Show icons</a>"; 152 152 } 153 153 … … 160 160 $body .= <<< END 161 161 162 <TABLEid="search_table" cellpadding="0" cellspacing="0">163 <tr>164 <td width="10%" colspan="2">$icontoggle</td>165 <td width="25%" valign="top"><b>$name</b></td>166 <td width="25%" valign="top"><b>$description</b></td>167 <td width="12.5%" valign="top"><b>$connections</b></td>168 <td width="12.5%" valign="top"><b>$posts</b></td>169 <td width="15%" valign="top"><b>$type</b></td>170 </TR>162 <table id="search_table" cellpadding="0" cellspacing="0"> 163 <tr> 164 <td width="10%" colspan="2">$icontoggle</td> 165 <td width="25%" valign="top"><b>$name</b></td> 166 <td width="25%" valign="top"><b>$description</b></td> 167 <td width="12.5%" valign="top"><b>$connections</b></td> 168 <td width="12.5%" valign="top"><b>$posts</b></td> 169 <td width="15%" valign="top"><b>$type</b></td> 170 </tr> 171 171 172 172 END; … … 174 174 foreach($results as $result) { 175 175 176 $blogposts = get_record_sql(" select count(".$CFG->prefix."weblog_posts.ident) as weblogposts from ".$CFG->prefix."weblog_posts whereweblog = {$result->ident}");177 $description = get_record_sql(" select ".$CFG->prefix."profile_data.value from ".$CFG->prefix."profile_data where owner = {$result->ident} andname = 'briefdesc'");176 $blogposts = get_record_sql("SELECT COUNT(".$CFG->prefix."weblog_posts.ident) AS weblogposts FROM ".$CFG->prefix."weblog_posts WHERE weblog = {$result->ident}"); 177 $description = get_record_sql("SELECT ".$CFG->prefix."profile_data.value FROM ".$CFG->prefix."profile_data WHERE owner = {$result->ident} AND name = 'briefdesc'"); 178 178 179 179 $icon = "{$CFG->wwwroot}{$result->username}/icons/{$result->icon}/h/67/"; … … 191 191 $rowspan = ""; 192 192 $plus = ""; 193 194 if (!empty($filter)) { 193 194 if (!empty($filter)) { 195 195 if ($drilldown != $result->ident) { 196 $plus = "<a href=\"index.php?display=$display& searchtype=$searchtype&filter=$filter&drilldown=".$result->ident."#drilldown".$result->ident."\">+</a>";197 } else { 198 $plus = "<a href=\"index.php?display=$display& searchtype=$searchtype&filter=$filter\">-</a>";196 $plus = "<a href=\"index.php?display=$display&searchtype=$searchtype&filter=$filter&drilldown=".$result->ident."#drilldown".$result->ident."\">+</a>"; 197 } else { 198 $plus = "<a href=\"index.php?display=$display&searchtype=$searchtype&filter=$filter\">-</a>"; 199 199 $rowspan = "rowspan=\"2\""; 200 200 } … … 205 205 <tr> 206 206 <td style="border-right: 0" $rowspan> </td> 207 <td $rowspan>$iconcode</td>208 <td><a href="{$CFG->wwwroot}{$result->username}">{$name}</a></td>209 <td>{$description}</td>210 <td>{$result->members}</td>211 <td>{$blogposts->weblogposts}</td>212 <td>{$result->user_type}</td>213 </TR>214 END; 215 207 <td $rowspan>$iconcode</td> 208 <td><a href="{$CFG->wwwroot}{$result->username}">{$name}</a></td> 209 <td>{$description}</td> 210 <td>{$result->members}</td> 211 <td>{$blogposts->weblogposts}</td> 212 <td>{$result->user_type}</td> 213 </tr> 214 END; 215 216 216 } 217 217 218 218 $body .= <<< END 219 219 220 </ TABLE>220 </table> 221 221 222 222 END; devel/units/templates/templates_view.php
r587 r647 40 40 $column2 = "<a href=\"".url."_templates/preview.php?template_preview=".$template['id']."\" target=\"preview\">" . gettext("preview") . "</a>"; 41 41 $panel .= templates_draw(array( 42 'context' => 'adminTable',43 'name' => $name,44 'column1' => $column1,45 'column2' => $column246 )47 );42 'context' => 'adminTable', 43 'name' => $name, 44 'column1' => $column1, 45 'column2' => $column2 46 ) 47 ); 48 48 } 49 49 $templates = get_records('templates','owner',$USER->ident); … … 84 84 85 85 } 86 87 $ownerCommunities = get_records('users','owner',$USER->ident);88 $header3 = gettext("Change templates");89 $decs3 = gettext("The selected changes will affect:");90 91 $panel .= <<< END86 87 $ownerCommunities = get_records('users','owner',$USER->ident); 88 $header3 = gettext("Change templates"); 89 $decs3 = gettext("The selected changes will affect:"); 90 91 $panel .= <<< END 92 92 <br /> 93 93 <h2> … … 98 98 </p> 99 99 END; 100 101 $name = "<input type='checkbox' name='affected_areas[]' value='".$USER->ident."' checked=\"checked\" />";102 $column1 = "<h4>User page</h4>";103 $column2 = "<h4>". gettext("Your personal space") ."</h4>";104 $panel .= templates_draw(array(105 'context' => 'adminTable',106 'name' => $name,107 'column1' => $column1,108 'column2' => $column2109 )110 );111 112 if(!empty($ownerCommunities)) {113 foreach($ownerCommunities as $ownerCommunity) {114 $name = "<input type='checkbox' name='affected_areas[]' value='".$ownerCommunity->ident."' />";115 $column1 = "<h4>".stripslashes($ownerCommunity->name)."</h4>";116 $column2 = "<h4>".gettext("Community: ") . stripslashes($ownerCommunity->name)."</h4>";117 $panel .= templates_draw(array(118 'context' => 'adminTable',119 'name' => $name,120 'column1' => $column1,121 'column2' => $column2122 )123 );124 }125 }100 101 $name = "<input type='checkbox' name='affected_areas[]' value='".$USER->ident."' checked=\"checked\" />"; 102 $column1 = "<h4>User page</h4>"; 103 $column2 = "<h4>". gettext("Your personal space") ."</h4>"; 104 $panel .= templates_draw(array( 105 'context' => 'adminTable', 106 'name' => $name, 107 'column1' => $column1, 108 'column2' => $column2 109 ) 110 ); 111 112 if(!empty($ownerCommunities)) { 113 foreach($ownerCommunities as $ownerCommunity) { 114 $name = "<input type='checkbox' name='affected_areas[]' value='".$ownerCommunity->ident."' />"; 115 $column1 = "<h4>".stripslashes($ownerCommunity->name)."</h4>"; 116 $column2 = "<h4>".gettext("Community: ") . stripslashes($ownerCommunity->name)."</h4>"; 117 $panel .= templates_draw(array( 118 'context' => 'adminTable', 119 'name' => $name, 120 'column1' => $column1, 121 'column2' => $column2 122 ) 123 ); 124 } 125 } 126 126 127 127 $submitValue = gettext("Select new theme"); // gettext variable … … 129 129 130 130 <p> 131 <input type="submit" value= $submitValue/>131 <input type="submit" value="$submitValue" /> 132 132 <input type="hidden" name="action" value="templates:select" /> 133 133 </p> devel/units/weblogs/weblogs_friends_view.php
r454 r647 15 15 $friends = run("friends:get",array($page_owner)); 16 16 17 $where2 = "weblog = '$page_owner'";17 $where2 = "weblog IN (" . $page_owner; 18 18 19 19 if (!empty($friends)) { 20 20 foreach($friends as $friend) { 21 22 if ($where2 != "") { 23 $where2 .= "or "; 21 if ($where2) { 22 $where2 .= ", "; 24 23 } 25 $where2 .= "weblog='$friend->user_id'";24 $where2 .= $friend->user_id; 26 25 } 27 28 26 } 27 $where2 .= ")"; 29 28 30 29 $where1 = run("users:access_level_sql_where",$_SESSION['userid']);
