Subversion Repositories cheapmusic

Rev

Rev 103 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 103 Rev 155
Line 215... Line 215...
215
			$sql .= " and extra_val not like '%LINK_TYPE=reciprocal%' and is_reciprocal=0";
215
			$sql .= " and extra_val not like '%LINK_TYPE=reciprocal%' and is_reciprocal=0";
216
		}		
216
		}		
217
		
217
		
218
		if(!empty($dirId)) $sql .= " and id=$dirId";
218
		if(!empty($dirId)) $sql .= " and id=$dirId";
219
		if(count($dirList) > 0) $sql .= " and id not in (".implode(',', $dirList).")";
219
		if(count($dirList) > 0) $sql .= " and id not in (".implode(',', $dirList).")";
220
		$sql .= " order by rank DESC, extra_val ASC, id ASC";
220
		$sql .= " order by `rank` DESC, extra_val ASC, id ASC";
221
		$dirInfo = $this->db->select($sql, true);
221
		$dirInfo = $this->db->select($sql, true);
222
		$this->set('dirInfo', $dirInfo);		
222
		$this->set('dirInfo', $dirInfo);		
223
		
223
		
224
		# directory list is empty
224
		# directory list is empty
225
		if(empty($dirInfo['id'])) {
225
		if(empty($dirInfo['id'])) {
Line 442... Line 442...
442
			if (!empty($matches[1])) {
442
			if (!empty($matches[1])) {
443
				$this->set('msg', $matches[1]);
443
				$this->set('msg', $matches[1]);
444
				$status = 1;
444
				$status = 1;
445
				
445
				
446
				// to update the rank of directory
446
				// to update the rank of directory
447
				$sql = "update directories set rank=rank+1 where id=".$submitInfo['dir_id'];
447
				$sql = "update directories set `rank`=`rank`+1 where id=".$submitInfo['dir_id'];
448
				$this->db->query($sql);				
448
				$this->db->query($sql);				
449
			}
449
			}
450
			
450
			
451
			
451
			
452
			$sql = "select id from dirsubmitinfo where website_id={$submitInfo['website_id']} and directory_id={$submitInfo['dir_id']}";
452
			$sql = "select id from dirsubmitinfo where website_id={$submitInfo['website_id']} and directory_id={$submitInfo['dir_id']}";