Error with DC Motors

I'm trying to do a simple project using DC motors. I follow step by step the project book but it doesn't work so i decide to simplify my circuit remove some switch and the potentiometer but it still doesn't work.
This is my circuit. I'm using a 9V battery and it work right 'cause if i connect my dc motor to the battrery it works.

http://postimg.org/image/j7e7ej9wz/

This is my source code :

const int controlPin1 = 2;
const int controlPin2 = 3;
const int enablePin = 9;
const int potPin = A0;
int onOffSwitchState = 0;
int previousOnOffSwitchState = 0;
int directionSwitchState = 0;
int previousDirectionSwitchState = 0;
int motorEnabled = 0;
int motorSpeed = 0;
int motorDirection = 1;

void setup() {
  pinMode(controlPin1,OUTPUT);
  pinMode(controlPin2,OUTPUT);
  pinMode(enablePin,OUTPUT);
  digitalWrite(enablePin,LOW);
  Serial.begin(9600);
}

void loop() {
  onOffSwitchState = 1;
  delay(1);
  directionSwitchState = 1;
  Serial.print("DIRECTION :");
  Serial.println(directionSwitchState);
  motorSpeed = 255;
  Serial.println(motorSpeed);
  if(onOffSwitchState != previousOnOffSwitchState){
    if(onOffSwitchState == HIGH){
      motorEnabled = !motorEnabled;
    }
  }
  if(directionSwitchState != previousDirectionSwitchState){
    if(directionSwitchState == HIGH){
      motorDirection = !motorDirection;
    }
  }
  if(motorDirection == 1){
    digitalWrite(controlPin1,HIGH);
    digitalWrite(controlPin2,LOW);
  }
  else{
    digitalWrite(controlPin1,LOW);
    digitalWrite(controlPin2,HIGH);
  }
  if(motorEnabled == 1){
    analogWrite(enablePin,motorSpeed);
  }
  else{
    analogWrite(enablePin,0);
  }
  previousDirectionSwitchState = directionSwitchState;
  previousOnOffSwitchState = onOffSwitchState;
}

Where i'm wrong? Thanks.

Please post a clear photo of hand-drawn wiring diagram (not Fritzing!).

What was wrong with the other thread?

People were trying to help in the other thread. They asked you questions. Rather than answer, you start a new thread. This strikes me as very rude.